001
014
015 package com.liferay.portal.model;
016
017 import com.liferay.portal.kernel.util.Validator;
018
019 import java.util.HashMap;
020 import java.util.Map;
021
022
031 public class UserGroupWrapper implements UserGroup, ModelWrapper<UserGroup> {
032 public UserGroupWrapper(UserGroup userGroup) {
033 _userGroup = userGroup;
034 }
035
036 public Class<?> getModelClass() {
037 return UserGroup.class;
038 }
039
040 public String getModelClassName() {
041 return UserGroup.class.getName();
042 }
043
044 public Map<String, Object> getModelAttributes() {
045 Map<String, Object> attributes = new HashMap<String, Object>();
046
047 attributes.put("userGroupId", getUserGroupId());
048 attributes.put("companyId", getCompanyId());
049 attributes.put("parentUserGroupId", getParentUserGroupId());
050 attributes.put("name", getName());
051 attributes.put("description", getDescription());
052 attributes.put("addedByLDAPImport", getAddedByLDAPImport());
053
054 return attributes;
055 }
056
057 public void setModelAttributes(Map<String, Object> attributes) {
058 Long userGroupId = (Long)attributes.get("userGroupId");
059
060 if (userGroupId != null) {
061 setUserGroupId(userGroupId);
062 }
063
064 Long companyId = (Long)attributes.get("companyId");
065
066 if (companyId != null) {
067 setCompanyId(companyId);
068 }
069
070 Long parentUserGroupId = (Long)attributes.get("parentUserGroupId");
071
072 if (parentUserGroupId != null) {
073 setParentUserGroupId(parentUserGroupId);
074 }
075
076 String name = (String)attributes.get("name");
077
078 if (name != null) {
079 setName(name);
080 }
081
082 String description = (String)attributes.get("description");
083
084 if (description != null) {
085 setDescription(description);
086 }
087
088 Boolean addedByLDAPImport = (Boolean)attributes.get("addedByLDAPImport");
089
090 if (addedByLDAPImport != null) {
091 setAddedByLDAPImport(addedByLDAPImport);
092 }
093 }
094
095
100 public long getPrimaryKey() {
101 return _userGroup.getPrimaryKey();
102 }
103
104
109 public void setPrimaryKey(long primaryKey) {
110 _userGroup.setPrimaryKey(primaryKey);
111 }
112
113
118 public long getUserGroupId() {
119 return _userGroup.getUserGroupId();
120 }
121
122
127 public void setUserGroupId(long userGroupId) {
128 _userGroup.setUserGroupId(userGroupId);
129 }
130
131
136 public long getCompanyId() {
137 return _userGroup.getCompanyId();
138 }
139
140
145 public void setCompanyId(long companyId) {
146 _userGroup.setCompanyId(companyId);
147 }
148
149
154 public long getParentUserGroupId() {
155 return _userGroup.getParentUserGroupId();
156 }
157
158
163 public void setParentUserGroupId(long parentUserGroupId) {
164 _userGroup.setParentUserGroupId(parentUserGroupId);
165 }
166
167
172 public java.lang.String getName() {
173 return _userGroup.getName();
174 }
175
176
181 public void setName(java.lang.String name) {
182 _userGroup.setName(name);
183 }
184
185
190 public java.lang.String getDescription() {
191 return _userGroup.getDescription();
192 }
193
194
199 public void setDescription(java.lang.String description) {
200 _userGroup.setDescription(description);
201 }
202
203
208 public boolean getAddedByLDAPImport() {
209 return _userGroup.getAddedByLDAPImport();
210 }
211
212
217 public boolean isAddedByLDAPImport() {
218 return _userGroup.isAddedByLDAPImport();
219 }
220
221
226 public void setAddedByLDAPImport(boolean addedByLDAPImport) {
227 _userGroup.setAddedByLDAPImport(addedByLDAPImport);
228 }
229
230 public boolean isNew() {
231 return _userGroup.isNew();
232 }
233
234 public void setNew(boolean n) {
235 _userGroup.setNew(n);
236 }
237
238 public boolean isCachedModel() {
239 return _userGroup.isCachedModel();
240 }
241
242 public void setCachedModel(boolean cachedModel) {
243 _userGroup.setCachedModel(cachedModel);
244 }
245
246 public boolean isEscapedModel() {
247 return _userGroup.isEscapedModel();
248 }
249
250 public java.io.Serializable getPrimaryKeyObj() {
251 return _userGroup.getPrimaryKeyObj();
252 }
253
254 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
255 _userGroup.setPrimaryKeyObj(primaryKeyObj);
256 }
257
258 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
259 return _userGroup.getExpandoBridge();
260 }
261
262 public void setExpandoBridgeAttributes(
263 com.liferay.portal.service.ServiceContext serviceContext) {
264 _userGroup.setExpandoBridgeAttributes(serviceContext);
265 }
266
267 @Override
268 public java.lang.Object clone() {
269 return new UserGroupWrapper((UserGroup)_userGroup.clone());
270 }
271
272 public int compareTo(com.liferay.portal.model.UserGroup userGroup) {
273 return _userGroup.compareTo(userGroup);
274 }
275
276 @Override
277 public int hashCode() {
278 return _userGroup.hashCode();
279 }
280
281 public com.liferay.portal.model.CacheModel<com.liferay.portal.model.UserGroup> toCacheModel() {
282 return _userGroup.toCacheModel();
283 }
284
285 public com.liferay.portal.model.UserGroup toEscapedModel() {
286 return new UserGroupWrapper(_userGroup.toEscapedModel());
287 }
288
289 public com.liferay.portal.model.UserGroup toUnescapedModel() {
290 return new UserGroupWrapper(_userGroup.toUnescapedModel());
291 }
292
293 @Override
294 public java.lang.String toString() {
295 return _userGroup.toString();
296 }
297
298 public java.lang.String toXmlString() {
299 return _userGroup.toXmlString();
300 }
301
302 public void persist()
303 throws com.liferay.portal.kernel.exception.SystemException {
304 _userGroup.persist();
305 }
306
307 public com.liferay.portal.model.Group getGroup()
308 throws com.liferay.portal.kernel.exception.PortalException,
309 com.liferay.portal.kernel.exception.SystemException {
310 return _userGroup.getGroup();
311 }
312
313 public int getPrivateLayoutsPageCount()
314 throws com.liferay.portal.kernel.exception.PortalException,
315 com.liferay.portal.kernel.exception.SystemException {
316 return _userGroup.getPrivateLayoutsPageCount();
317 }
318
319 public int getPublicLayoutsPageCount()
320 throws com.liferay.portal.kernel.exception.PortalException,
321 com.liferay.portal.kernel.exception.SystemException {
322 return _userGroup.getPublicLayoutsPageCount();
323 }
324
325 public boolean hasPrivateLayouts()
326 throws com.liferay.portal.kernel.exception.PortalException,
327 com.liferay.portal.kernel.exception.SystemException {
328 return _userGroup.hasPrivateLayouts();
329 }
330
331 public boolean hasPublicLayouts()
332 throws com.liferay.portal.kernel.exception.PortalException,
333 com.liferay.portal.kernel.exception.SystemException {
334 return _userGroup.hasPublicLayouts();
335 }
336
337 @Override
338 public boolean equals(Object obj) {
339 if (this == obj) {
340 return true;
341 }
342
343 if (!(obj instanceof UserGroupWrapper)) {
344 return false;
345 }
346
347 UserGroupWrapper userGroupWrapper = (UserGroupWrapper)obj;
348
349 if (Validator.equals(_userGroup, userGroupWrapper._userGroup)) {
350 return true;
351 }
352
353 return false;
354 }
355
356
359 public UserGroup getWrappedUserGroup() {
360 return _userGroup;
361 }
362
363 public UserGroup getWrappedModel() {
364 return _userGroup;
365 }
366
367 public void resetOriginalValues() {
368 _userGroup.resetOriginalValues();
369 }
370
371 private UserGroup _userGroup;
372 }