001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.model;
016    
017    import java.util.Date;
018    import java.util.HashMap;
019    import java.util.Map;
020    
021    /**
022     * <p>
023     * This class is a wrapper for {@link UserGroup}.
024     * </p>
025     *
026     * @author    Brian Wing Shun Chan
027     * @see       UserGroup
028     * @generated
029     */
030    public class UserGroupWrapper implements UserGroup, ModelWrapper<UserGroup> {
031            public UserGroupWrapper(UserGroup userGroup) {
032                    _userGroup = userGroup;
033            }
034    
035            public Class<?> getModelClass() {
036                    return UserGroup.class;
037            }
038    
039            public String getModelClassName() {
040                    return UserGroup.class.getName();
041            }
042    
043            public Map<String, Object> getModelAttributes() {
044                    Map<String, Object> attributes = new HashMap<String, Object>();
045    
046                    attributes.put("uuid", getUuid());
047                    attributes.put("userGroupId", getUserGroupId());
048                    attributes.put("companyId", getCompanyId());
049                    attributes.put("userId", getUserId());
050                    attributes.put("userName", getUserName());
051                    attributes.put("createDate", getCreateDate());
052                    attributes.put("modifiedDate", getModifiedDate());
053                    attributes.put("parentUserGroupId", getParentUserGroupId());
054                    attributes.put("name", getName());
055                    attributes.put("description", getDescription());
056                    attributes.put("addedByLDAPImport", getAddedByLDAPImport());
057    
058                    return attributes;
059            }
060    
061            public void setModelAttributes(Map<String, Object> attributes) {
062                    String uuid = (String)attributes.get("uuid");
063    
064                    if (uuid != null) {
065                            setUuid(uuid);
066                    }
067    
068                    Long userGroupId = (Long)attributes.get("userGroupId");
069    
070                    if (userGroupId != null) {
071                            setUserGroupId(userGroupId);
072                    }
073    
074                    Long companyId = (Long)attributes.get("companyId");
075    
076                    if (companyId != null) {
077                            setCompanyId(companyId);
078                    }
079    
080                    Long userId = (Long)attributes.get("userId");
081    
082                    if (userId != null) {
083                            setUserId(userId);
084                    }
085    
086                    String userName = (String)attributes.get("userName");
087    
088                    if (userName != null) {
089                            setUserName(userName);
090                    }
091    
092                    Date createDate = (Date)attributes.get("createDate");
093    
094                    if (createDate != null) {
095                            setCreateDate(createDate);
096                    }
097    
098                    Date modifiedDate = (Date)attributes.get("modifiedDate");
099    
100                    if (modifiedDate != null) {
101                            setModifiedDate(modifiedDate);
102                    }
103    
104                    Long parentUserGroupId = (Long)attributes.get("parentUserGroupId");
105    
106                    if (parentUserGroupId != null) {
107                            setParentUserGroupId(parentUserGroupId);
108                    }
109    
110                    String name = (String)attributes.get("name");
111    
112                    if (name != null) {
113                            setName(name);
114                    }
115    
116                    String description = (String)attributes.get("description");
117    
118                    if (description != null) {
119                            setDescription(description);
120                    }
121    
122                    Boolean addedByLDAPImport = (Boolean)attributes.get("addedByLDAPImport");
123    
124                    if (addedByLDAPImport != null) {
125                            setAddedByLDAPImport(addedByLDAPImport);
126                    }
127            }
128    
129            /**
130            * Returns the primary key of this user group.
131            *
132            * @return the primary key of this user group
133            */
134            public long getPrimaryKey() {
135                    return _userGroup.getPrimaryKey();
136            }
137    
138            /**
139            * Sets the primary key of this user group.
140            *
141            * @param primaryKey the primary key of this user group
142            */
143            public void setPrimaryKey(long primaryKey) {
144                    _userGroup.setPrimaryKey(primaryKey);
145            }
146    
147            /**
148            * Returns the uuid of this user group.
149            *
150            * @return the uuid of this user group
151            */
152            public java.lang.String getUuid() {
153                    return _userGroup.getUuid();
154            }
155    
156            /**
157            * Sets the uuid of this user group.
158            *
159            * @param uuid the uuid of this user group
160            */
161            public void setUuid(java.lang.String uuid) {
162                    _userGroup.setUuid(uuid);
163            }
164    
165            /**
166            * Returns the user group ID of this user group.
167            *
168            * @return the user group ID of this user group
169            */
170            public long getUserGroupId() {
171                    return _userGroup.getUserGroupId();
172            }
173    
174            /**
175            * Sets the user group ID of this user group.
176            *
177            * @param userGroupId the user group ID of this user group
178            */
179            public void setUserGroupId(long userGroupId) {
180                    _userGroup.setUserGroupId(userGroupId);
181            }
182    
183            /**
184            * Returns the company ID of this user group.
185            *
186            * @return the company ID of this user group
187            */
188            public long getCompanyId() {
189                    return _userGroup.getCompanyId();
190            }
191    
192            /**
193            * Sets the company ID of this user group.
194            *
195            * @param companyId the company ID of this user group
196            */
197            public void setCompanyId(long companyId) {
198                    _userGroup.setCompanyId(companyId);
199            }
200    
201            /**
202            * Returns the user ID of this user group.
203            *
204            * @return the user ID of this user group
205            */
206            public long getUserId() {
207                    return _userGroup.getUserId();
208            }
209    
210            /**
211            * Sets the user ID of this user group.
212            *
213            * @param userId the user ID of this user group
214            */
215            public void setUserId(long userId) {
216                    _userGroup.setUserId(userId);
217            }
218    
219            /**
220            * Returns the user uuid of this user group.
221            *
222            * @return the user uuid of this user group
223            * @throws SystemException if a system exception occurred
224            */
225            public java.lang.String getUserUuid()
226                    throws com.liferay.portal.kernel.exception.SystemException {
227                    return _userGroup.getUserUuid();
228            }
229    
230            /**
231            * Sets the user uuid of this user group.
232            *
233            * @param userUuid the user uuid of this user group
234            */
235            public void setUserUuid(java.lang.String userUuid) {
236                    _userGroup.setUserUuid(userUuid);
237            }
238    
239            /**
240            * Returns the user name of this user group.
241            *
242            * @return the user name of this user group
243            */
244            public java.lang.String getUserName() {
245                    return _userGroup.getUserName();
246            }
247    
248            /**
249            * Sets the user name of this user group.
250            *
251            * @param userName the user name of this user group
252            */
253            public void setUserName(java.lang.String userName) {
254                    _userGroup.setUserName(userName);
255            }
256    
257            /**
258            * Returns the create date of this user group.
259            *
260            * @return the create date of this user group
261            */
262            public java.util.Date getCreateDate() {
263                    return _userGroup.getCreateDate();
264            }
265    
266            /**
267            * Sets the create date of this user group.
268            *
269            * @param createDate the create date of this user group
270            */
271            public void setCreateDate(java.util.Date createDate) {
272                    _userGroup.setCreateDate(createDate);
273            }
274    
275            /**
276            * Returns the modified date of this user group.
277            *
278            * @return the modified date of this user group
279            */
280            public java.util.Date getModifiedDate() {
281                    return _userGroup.getModifiedDate();
282            }
283    
284            /**
285            * Sets the modified date of this user group.
286            *
287            * @param modifiedDate the modified date of this user group
288            */
289            public void setModifiedDate(java.util.Date modifiedDate) {
290                    _userGroup.setModifiedDate(modifiedDate);
291            }
292    
293            /**
294            * Returns the parent user group ID of this user group.
295            *
296            * @return the parent user group ID of this user group
297            */
298            public long getParentUserGroupId() {
299                    return _userGroup.getParentUserGroupId();
300            }
301    
302            /**
303            * Sets the parent user group ID of this user group.
304            *
305            * @param parentUserGroupId the parent user group ID of this user group
306            */
307            public void setParentUserGroupId(long parentUserGroupId) {
308                    _userGroup.setParentUserGroupId(parentUserGroupId);
309            }
310    
311            /**
312            * Returns the name of this user group.
313            *
314            * @return the name of this user group
315            */
316            public java.lang.String getName() {
317                    return _userGroup.getName();
318            }
319    
320            /**
321            * Sets the name of this user group.
322            *
323            * @param name the name of this user group
324            */
325            public void setName(java.lang.String name) {
326                    _userGroup.setName(name);
327            }
328    
329            /**
330            * Returns the description of this user group.
331            *
332            * @return the description of this user group
333            */
334            public java.lang.String getDescription() {
335                    return _userGroup.getDescription();
336            }
337    
338            /**
339            * Sets the description of this user group.
340            *
341            * @param description the description of this user group
342            */
343            public void setDescription(java.lang.String description) {
344                    _userGroup.setDescription(description);
345            }
346    
347            /**
348            * Returns the added by l d a p import of this user group.
349            *
350            * @return the added by l d a p import of this user group
351            */
352            public boolean getAddedByLDAPImport() {
353                    return _userGroup.getAddedByLDAPImport();
354            }
355    
356            /**
357            * Returns <code>true</code> if this user group is added by l d a p import.
358            *
359            * @return <code>true</code> if this user group is added by l d a p import; <code>false</code> otherwise
360            */
361            public boolean isAddedByLDAPImport() {
362                    return _userGroup.isAddedByLDAPImport();
363            }
364    
365            /**
366            * Sets whether this user group is added by l d a p import.
367            *
368            * @param addedByLDAPImport the added by l d a p import of this user group
369            */
370            public void setAddedByLDAPImport(boolean addedByLDAPImport) {
371                    _userGroup.setAddedByLDAPImport(addedByLDAPImport);
372            }
373    
374            public boolean isNew() {
375                    return _userGroup.isNew();
376            }
377    
378            public void setNew(boolean n) {
379                    _userGroup.setNew(n);
380            }
381    
382            public boolean isCachedModel() {
383                    return _userGroup.isCachedModel();
384            }
385    
386            public void setCachedModel(boolean cachedModel) {
387                    _userGroup.setCachedModel(cachedModel);
388            }
389    
390            public boolean isEscapedModel() {
391                    return _userGroup.isEscapedModel();
392            }
393    
394            public java.io.Serializable getPrimaryKeyObj() {
395                    return _userGroup.getPrimaryKeyObj();
396            }
397    
398            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
399                    _userGroup.setPrimaryKeyObj(primaryKeyObj);
400            }
401    
402            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
403                    return _userGroup.getExpandoBridge();
404            }
405    
406            public void setExpandoBridgeAttributes(
407                    com.liferay.portal.model.BaseModel<?> baseModel) {
408                    _userGroup.setExpandoBridgeAttributes(baseModel);
409            }
410    
411            public void setExpandoBridgeAttributes(
412                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
413                    _userGroup.setExpandoBridgeAttributes(expandoBridge);
414            }
415    
416            public void setExpandoBridgeAttributes(
417                    com.liferay.portal.service.ServiceContext serviceContext) {
418                    _userGroup.setExpandoBridgeAttributes(serviceContext);
419            }
420    
421            @Override
422            public java.lang.Object clone() {
423                    return new UserGroupWrapper((UserGroup)_userGroup.clone());
424            }
425    
426            public int compareTo(com.liferay.portal.model.UserGroup userGroup) {
427                    return _userGroup.compareTo(userGroup);
428            }
429    
430            @Override
431            public int hashCode() {
432                    return _userGroup.hashCode();
433            }
434    
435            public com.liferay.portal.model.CacheModel<com.liferay.portal.model.UserGroup> toCacheModel() {
436                    return _userGroup.toCacheModel();
437            }
438    
439            public com.liferay.portal.model.UserGroup toEscapedModel() {
440                    return new UserGroupWrapper(_userGroup.toEscapedModel());
441            }
442    
443            public com.liferay.portal.model.UserGroup toUnescapedModel() {
444                    return new UserGroupWrapper(_userGroup.toUnescapedModel());
445            }
446    
447            @Override
448            public java.lang.String toString() {
449                    return _userGroup.toString();
450            }
451    
452            public java.lang.String toXmlString() {
453                    return _userGroup.toXmlString();
454            }
455    
456            public void persist()
457                    throws com.liferay.portal.kernel.exception.SystemException {
458                    _userGroup.persist();
459            }
460    
461            public com.liferay.portal.model.Group getGroup()
462                    throws com.liferay.portal.kernel.exception.PortalException,
463                            com.liferay.portal.kernel.exception.SystemException {
464                    return _userGroup.getGroup();
465            }
466    
467            public int getPrivateLayoutsPageCount()
468                    throws com.liferay.portal.kernel.exception.PortalException,
469                            com.liferay.portal.kernel.exception.SystemException {
470                    return _userGroup.getPrivateLayoutsPageCount();
471            }
472    
473            public int getPublicLayoutsPageCount()
474                    throws com.liferay.portal.kernel.exception.PortalException,
475                            com.liferay.portal.kernel.exception.SystemException {
476                    return _userGroup.getPublicLayoutsPageCount();
477            }
478    
479            public boolean hasPrivateLayouts()
480                    throws com.liferay.portal.kernel.exception.PortalException,
481                            com.liferay.portal.kernel.exception.SystemException {
482                    return _userGroup.hasPrivateLayouts();
483            }
484    
485            public boolean hasPublicLayouts()
486                    throws com.liferay.portal.kernel.exception.PortalException,
487                            com.liferay.portal.kernel.exception.SystemException {
488                    return _userGroup.hasPublicLayouts();
489            }
490    
491            /**
492             * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel}
493             */
494            public UserGroup getWrappedUserGroup() {
495                    return _userGroup;
496            }
497    
498            public UserGroup getWrappedModel() {
499                    return _userGroup;
500            }
501    
502            public void resetOriginalValues() {
503                    _userGroup.resetOriginalValues();
504            }
505    
506            private UserGroup _userGroup;
507    }