001    /**
002     * Copyright (c) 2000-present 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 aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.util.Validator;
020    
021    import com.liferay.portlet.exportimport.lar.StagedModelType;
022    
023    import java.util.Date;
024    import java.util.HashMap;
025    import java.util.Map;
026    
027    /**
028     * <p>
029     * This class is a wrapper for {@link UserGroup}.
030     * </p>
031     *
032     * @author Brian Wing Shun Chan
033     * @see UserGroup
034     * @generated
035     */
036    @ProviderType
037    public class UserGroupWrapper implements UserGroup, ModelWrapper<UserGroup> {
038            public UserGroupWrapper(UserGroup userGroup) {
039                    _userGroup = userGroup;
040            }
041    
042            @Override
043            public Class<?> getModelClass() {
044                    return UserGroup.class;
045            }
046    
047            @Override
048            public String getModelClassName() {
049                    return UserGroup.class.getName();
050            }
051    
052            @Override
053            public Map<String, Object> getModelAttributes() {
054                    Map<String, Object> attributes = new HashMap<String, Object>();
055    
056                    attributes.put("mvccVersion", getMvccVersion());
057                    attributes.put("uuid", getUuid());
058                    attributes.put("userGroupId", getUserGroupId());
059                    attributes.put("companyId", getCompanyId());
060                    attributes.put("userId", getUserId());
061                    attributes.put("userName", getUserName());
062                    attributes.put("createDate", getCreateDate());
063                    attributes.put("modifiedDate", getModifiedDate());
064                    attributes.put("parentUserGroupId", getParentUserGroupId());
065                    attributes.put("name", getName());
066                    attributes.put("description", getDescription());
067                    attributes.put("addedByLDAPImport", getAddedByLDAPImport());
068                    attributes.put("lastPublishDate", getLastPublishDate());
069    
070                    return attributes;
071            }
072    
073            @Override
074            public void setModelAttributes(Map<String, Object> attributes) {
075                    Long mvccVersion = (Long)attributes.get("mvccVersion");
076    
077                    if (mvccVersion != null) {
078                            setMvccVersion(mvccVersion);
079                    }
080    
081                    String uuid = (String)attributes.get("uuid");
082    
083                    if (uuid != null) {
084                            setUuid(uuid);
085                    }
086    
087                    Long userGroupId = (Long)attributes.get("userGroupId");
088    
089                    if (userGroupId != null) {
090                            setUserGroupId(userGroupId);
091                    }
092    
093                    Long companyId = (Long)attributes.get("companyId");
094    
095                    if (companyId != null) {
096                            setCompanyId(companyId);
097                    }
098    
099                    Long userId = (Long)attributes.get("userId");
100    
101                    if (userId != null) {
102                            setUserId(userId);
103                    }
104    
105                    String userName = (String)attributes.get("userName");
106    
107                    if (userName != null) {
108                            setUserName(userName);
109                    }
110    
111                    Date createDate = (Date)attributes.get("createDate");
112    
113                    if (createDate != null) {
114                            setCreateDate(createDate);
115                    }
116    
117                    Date modifiedDate = (Date)attributes.get("modifiedDate");
118    
119                    if (modifiedDate != null) {
120                            setModifiedDate(modifiedDate);
121                    }
122    
123                    Long parentUserGroupId = (Long)attributes.get("parentUserGroupId");
124    
125                    if (parentUserGroupId != null) {
126                            setParentUserGroupId(parentUserGroupId);
127                    }
128    
129                    String name = (String)attributes.get("name");
130    
131                    if (name != null) {
132                            setName(name);
133                    }
134    
135                    String description = (String)attributes.get("description");
136    
137                    if (description != null) {
138                            setDescription(description);
139                    }
140    
141                    Boolean addedByLDAPImport = (Boolean)attributes.get("addedByLDAPImport");
142    
143                    if (addedByLDAPImport != null) {
144                            setAddedByLDAPImport(addedByLDAPImport);
145                    }
146    
147                    Date lastPublishDate = (Date)attributes.get("lastPublishDate");
148    
149                    if (lastPublishDate != null) {
150                            setLastPublishDate(lastPublishDate);
151                    }
152            }
153    
154            @Override
155            public java.lang.Object clone() {
156                    return new UserGroupWrapper((UserGroup)_userGroup.clone());
157            }
158    
159            @Override
160            public int compareTo(com.liferay.portal.model.UserGroup userGroup) {
161                    return _userGroup.compareTo(userGroup);
162            }
163    
164            /**
165            * Returns the added by l d a p import of this user group.
166            *
167            * @return the added by l d a p import of this user group
168            */
169            @Override
170            public boolean getAddedByLDAPImport() {
171                    return _userGroup.getAddedByLDAPImport();
172            }
173    
174            /**
175            * Returns the company ID of this user group.
176            *
177            * @return the company ID of this user group
178            */
179            @Override
180            public long getCompanyId() {
181                    return _userGroup.getCompanyId();
182            }
183    
184            /**
185            * Returns the create date of this user group.
186            *
187            * @return the create date of this user group
188            */
189            @Override
190            public Date getCreateDate() {
191                    return _userGroup.getCreateDate();
192            }
193    
194            /**
195            * Returns the description of this user group.
196            *
197            * @return the description of this user group
198            */
199            @Override
200            public java.lang.String getDescription() {
201                    return _userGroup.getDescription();
202            }
203    
204            @Override
205            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
206                    return _userGroup.getExpandoBridge();
207            }
208    
209            @Override
210            public com.liferay.portal.model.Group getGroup()
211                    throws com.liferay.portal.kernel.exception.PortalException {
212                    return _userGroup.getGroup();
213            }
214    
215            @Override
216            public long getGroupId()
217                    throws com.liferay.portal.kernel.exception.PortalException {
218                    return _userGroup.getGroupId();
219            }
220    
221            /**
222            * Returns the last publish date of this user group.
223            *
224            * @return the last publish date of this user group
225            */
226            @Override
227            public Date getLastPublishDate() {
228                    return _userGroup.getLastPublishDate();
229            }
230    
231            /**
232            * Returns the modified date of this user group.
233            *
234            * @return the modified date of this user group
235            */
236            @Override
237            public Date getModifiedDate() {
238                    return _userGroup.getModifiedDate();
239            }
240    
241            /**
242            * Returns the mvcc version of this user group.
243            *
244            * @return the mvcc version of this user group
245            */
246            @Override
247            public long getMvccVersion() {
248                    return _userGroup.getMvccVersion();
249            }
250    
251            /**
252            * Returns the name of this user group.
253            *
254            * @return the name of this user group
255            */
256            @Override
257            public java.lang.String getName() {
258                    return _userGroup.getName();
259            }
260    
261            /**
262            * Returns the parent user group ID of this user group.
263            *
264            * @return the parent user group ID of this user group
265            */
266            @Override
267            public long getParentUserGroupId() {
268                    return _userGroup.getParentUserGroupId();
269            }
270    
271            /**
272            * Returns the primary key of this user group.
273            *
274            * @return the primary key of this user group
275            */
276            @Override
277            public long getPrimaryKey() {
278                    return _userGroup.getPrimaryKey();
279            }
280    
281            @Override
282            public java.io.Serializable getPrimaryKeyObj() {
283                    return _userGroup.getPrimaryKeyObj();
284            }
285    
286            @Override
287            public int getPrivateLayoutsPageCount()
288                    throws com.liferay.portal.kernel.exception.PortalException {
289                    return _userGroup.getPrivateLayoutsPageCount();
290            }
291    
292            @Override
293            public int getPublicLayoutsPageCount()
294                    throws com.liferay.portal.kernel.exception.PortalException {
295                    return _userGroup.getPublicLayoutsPageCount();
296            }
297    
298            /**
299            * Returns the user group ID of this user group.
300            *
301            * @return the user group ID of this user group
302            */
303            @Override
304            public long getUserGroupId() {
305                    return _userGroup.getUserGroupId();
306            }
307    
308            /**
309            * Returns the user ID of this user group.
310            *
311            * @return the user ID of this user group
312            */
313            @Override
314            public long getUserId() {
315                    return _userGroup.getUserId();
316            }
317    
318            /**
319            * Returns the user name of this user group.
320            *
321            * @return the user name of this user group
322            */
323            @Override
324            public java.lang.String getUserName() {
325                    return _userGroup.getUserName();
326            }
327    
328            /**
329            * Returns the user uuid of this user group.
330            *
331            * @return the user uuid of this user group
332            */
333            @Override
334            public java.lang.String getUserUuid() {
335                    return _userGroup.getUserUuid();
336            }
337    
338            /**
339            * Returns the uuid of this user group.
340            *
341            * @return the uuid of this user group
342            */
343            @Override
344            public java.lang.String getUuid() {
345                    return _userGroup.getUuid();
346            }
347    
348            @Override
349            public boolean hasPrivateLayouts()
350                    throws com.liferay.portal.kernel.exception.PortalException {
351                    return _userGroup.hasPrivateLayouts();
352            }
353    
354            @Override
355            public boolean hasPublicLayouts()
356                    throws com.liferay.portal.kernel.exception.PortalException {
357                    return _userGroup.hasPublicLayouts();
358            }
359    
360            @Override
361            public int hashCode() {
362                    return _userGroup.hashCode();
363            }
364    
365            /**
366            * Returns <code>true</code> if this user group is added by l d a p import.
367            *
368            * @return <code>true</code> if this user group is added by l d a p import; <code>false</code> otherwise
369            */
370            @Override
371            public boolean isAddedByLDAPImport() {
372                    return _userGroup.isAddedByLDAPImport();
373            }
374    
375            @Override
376            public boolean isCachedModel() {
377                    return _userGroup.isCachedModel();
378            }
379    
380            @Override
381            public boolean isEscapedModel() {
382                    return _userGroup.isEscapedModel();
383            }
384    
385            @Override
386            public boolean isNew() {
387                    return _userGroup.isNew();
388            }
389    
390            @Override
391            public void persist() {
392                    _userGroup.persist();
393            }
394    
395            /**
396            * Sets whether this user group is added by l d a p import.
397            *
398            * @param addedByLDAPImport the added by l d a p import of this user group
399            */
400            @Override
401            public void setAddedByLDAPImport(boolean addedByLDAPImport) {
402                    _userGroup.setAddedByLDAPImport(addedByLDAPImport);
403            }
404    
405            @Override
406            public void setCachedModel(boolean cachedModel) {
407                    _userGroup.setCachedModel(cachedModel);
408            }
409    
410            /**
411            * Sets the company ID of this user group.
412            *
413            * @param companyId the company ID of this user group
414            */
415            @Override
416            public void setCompanyId(long companyId) {
417                    _userGroup.setCompanyId(companyId);
418            }
419    
420            /**
421            * Sets the create date of this user group.
422            *
423            * @param createDate the create date of this user group
424            */
425            @Override
426            public void setCreateDate(Date createDate) {
427                    _userGroup.setCreateDate(createDate);
428            }
429    
430            /**
431            * Sets the description of this user group.
432            *
433            * @param description the description of this user group
434            */
435            @Override
436            public void setDescription(java.lang.String description) {
437                    _userGroup.setDescription(description);
438            }
439    
440            @Override
441            public void setExpandoBridgeAttributes(BaseModel<?> baseModel) {
442                    _userGroup.setExpandoBridgeAttributes(baseModel);
443            }
444    
445            @Override
446            public void setExpandoBridgeAttributes(
447                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
448                    _userGroup.setExpandoBridgeAttributes(expandoBridge);
449            }
450    
451            @Override
452            public void setExpandoBridgeAttributes(
453                    com.liferay.portal.service.ServiceContext serviceContext) {
454                    _userGroup.setExpandoBridgeAttributes(serviceContext);
455            }
456    
457            /**
458            * Sets the last publish date of this user group.
459            *
460            * @param lastPublishDate the last publish date of this user group
461            */
462            @Override
463            public void setLastPublishDate(Date lastPublishDate) {
464                    _userGroup.setLastPublishDate(lastPublishDate);
465            }
466    
467            /**
468            * Sets the modified date of this user group.
469            *
470            * @param modifiedDate the modified date of this user group
471            */
472            @Override
473            public void setModifiedDate(Date modifiedDate) {
474                    _userGroup.setModifiedDate(modifiedDate);
475            }
476    
477            /**
478            * Sets the mvcc version of this user group.
479            *
480            * @param mvccVersion the mvcc version of this user group
481            */
482            @Override
483            public void setMvccVersion(long mvccVersion) {
484                    _userGroup.setMvccVersion(mvccVersion);
485            }
486    
487            /**
488            * Sets the name of this user group.
489            *
490            * @param name the name of this user group
491            */
492            @Override
493            public void setName(java.lang.String name) {
494                    _userGroup.setName(name);
495            }
496    
497            @Override
498            public void setNew(boolean n) {
499                    _userGroup.setNew(n);
500            }
501    
502            /**
503            * Sets the parent user group ID of this user group.
504            *
505            * @param parentUserGroupId the parent user group ID of this user group
506            */
507            @Override
508            public void setParentUserGroupId(long parentUserGroupId) {
509                    _userGroup.setParentUserGroupId(parentUserGroupId);
510            }
511    
512            /**
513            * Sets the primary key of this user group.
514            *
515            * @param primaryKey the primary key of this user group
516            */
517            @Override
518            public void setPrimaryKey(long primaryKey) {
519                    _userGroup.setPrimaryKey(primaryKey);
520            }
521    
522            @Override
523            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
524                    _userGroup.setPrimaryKeyObj(primaryKeyObj);
525            }
526    
527            /**
528            * Sets the user group ID of this user group.
529            *
530            * @param userGroupId the user group ID of this user group
531            */
532            @Override
533            public void setUserGroupId(long userGroupId) {
534                    _userGroup.setUserGroupId(userGroupId);
535            }
536    
537            /**
538            * Sets the user ID of this user group.
539            *
540            * @param userId the user ID of this user group
541            */
542            @Override
543            public void setUserId(long userId) {
544                    _userGroup.setUserId(userId);
545            }
546    
547            /**
548            * Sets the user name of this user group.
549            *
550            * @param userName the user name of this user group
551            */
552            @Override
553            public void setUserName(java.lang.String userName) {
554                    _userGroup.setUserName(userName);
555            }
556    
557            /**
558            * Sets the user uuid of this user group.
559            *
560            * @param userUuid the user uuid of this user group
561            */
562            @Override
563            public void setUserUuid(java.lang.String userUuid) {
564                    _userGroup.setUserUuid(userUuid);
565            }
566    
567            /**
568            * Sets the uuid of this user group.
569            *
570            * @param uuid the uuid of this user group
571            */
572            @Override
573            public void setUuid(java.lang.String uuid) {
574                    _userGroup.setUuid(uuid);
575            }
576    
577            @Override
578            public CacheModel<com.liferay.portal.model.UserGroup> toCacheModel() {
579                    return _userGroup.toCacheModel();
580            }
581    
582            @Override
583            public com.liferay.portal.model.UserGroup toEscapedModel() {
584                    return new UserGroupWrapper(_userGroup.toEscapedModel());
585            }
586    
587            @Override
588            public java.lang.String toString() {
589                    return _userGroup.toString();
590            }
591    
592            @Override
593            public com.liferay.portal.model.UserGroup toUnescapedModel() {
594                    return new UserGroupWrapper(_userGroup.toUnescapedModel());
595            }
596    
597            @Override
598            public java.lang.String toXmlString() {
599                    return _userGroup.toXmlString();
600            }
601    
602            @Override
603            public boolean equals(Object obj) {
604                    if (this == obj) {
605                            return true;
606                    }
607    
608                    if (!(obj instanceof UserGroupWrapper)) {
609                            return false;
610                    }
611    
612                    UserGroupWrapper userGroupWrapper = (UserGroupWrapper)obj;
613    
614                    if (Validator.equals(_userGroup, userGroupWrapper._userGroup)) {
615                            return true;
616                    }
617    
618                    return false;
619            }
620    
621            @Override
622            public StagedModelType getStagedModelType() {
623                    return _userGroup.getStagedModelType();
624            }
625    
626            @Override
627            public UserGroup getWrappedModel() {
628                    return _userGroup;
629            }
630    
631            @Override
632            public boolean isEntityCacheEnabled() {
633                    return _userGroup.isEntityCacheEnabled();
634            }
635    
636            @Override
637            public boolean isFinderCacheEnabled() {
638                    return _userGroup.isFinderCacheEnabled();
639            }
640    
641            @Override
642            public void resetOriginalValues() {
643                    _userGroup.resetOriginalValues();
644            }
645    
646            private final UserGroup _userGroup;
647    }