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