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    
025    import java.io.Serializable;
026    
027    import java.util.Date;
028    import java.util.HashMap;
029    import java.util.Map;
030    import java.util.Objects;
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 CacheModel<UserGroup> toCacheModel() {
154                    return _userGroup.toCacheModel();
155            }
156    
157            @Override
158            public Group getGroup()
159                    throws com.liferay.portal.kernel.exception.PortalException {
160                    return _userGroup.getGroup();
161            }
162    
163            @Override
164            public UserGroup toEscapedModel() {
165                    return new UserGroupWrapper(_userGroup.toEscapedModel());
166            }
167    
168            @Override
169            public UserGroup toUnescapedModel() {
170                    return new UserGroupWrapper(_userGroup.toUnescapedModel());
171            }
172    
173            /**
174            * Returns the added by l d a p import of this user group.
175            *
176            * @return the added by l d a p import of this user group
177            */
178            @Override
179            public boolean getAddedByLDAPImport() {
180                    return _userGroup.getAddedByLDAPImport();
181            }
182    
183            @Override
184            public boolean hasPrivateLayouts()
185                    throws com.liferay.portal.kernel.exception.PortalException {
186                    return _userGroup.hasPrivateLayouts();
187            }
188    
189            @Override
190            public boolean hasPublicLayouts()
191                    throws com.liferay.portal.kernel.exception.PortalException {
192                    return _userGroup.hasPublicLayouts();
193            }
194    
195            /**
196            * Returns <code>true</code> if this user group is added by l d a p import.
197            *
198            * @return <code>true</code> if this user group is added by l d a p import; <code>false</code> otherwise
199            */
200            @Override
201            public boolean isAddedByLDAPImport() {
202                    return _userGroup.isAddedByLDAPImport();
203            }
204    
205            @Override
206            public boolean isCachedModel() {
207                    return _userGroup.isCachedModel();
208            }
209    
210            @Override
211            public boolean isEscapedModel() {
212                    return _userGroup.isEscapedModel();
213            }
214    
215            @Override
216            public boolean isNew() {
217                    return _userGroup.isNew();
218            }
219    
220            @Override
221            public ExpandoBridge getExpandoBridge() {
222                    return _userGroup.getExpandoBridge();
223            }
224    
225            @Override
226            public int compareTo(UserGroup userGroup) {
227                    return _userGroup.compareTo(userGroup);
228            }
229    
230            @Override
231            public int getPrivateLayoutsPageCount()
232                    throws com.liferay.portal.kernel.exception.PortalException {
233                    return _userGroup.getPrivateLayoutsPageCount();
234            }
235    
236            @Override
237            public int getPublicLayoutsPageCount()
238                    throws com.liferay.portal.kernel.exception.PortalException {
239                    return _userGroup.getPublicLayoutsPageCount();
240            }
241    
242            @Override
243            public int hashCode() {
244                    return _userGroup.hashCode();
245            }
246    
247            @Override
248            public Serializable getPrimaryKeyObj() {
249                    return _userGroup.getPrimaryKeyObj();
250            }
251    
252            @Override
253            public java.lang.Object clone() {
254                    return new UserGroupWrapper((UserGroup)_userGroup.clone());
255            }
256    
257            /**
258            * Returns the description of this user group.
259            *
260            * @return the description of this user group
261            */
262            @Override
263            public java.lang.String getDescription() {
264                    return _userGroup.getDescription();
265            }
266    
267            /**
268            * Returns the name of this user group.
269            *
270            * @return the name of this user group
271            */
272            @Override
273            public java.lang.String getName() {
274                    return _userGroup.getName();
275            }
276    
277            /**
278            * Returns the user name of this user group.
279            *
280            * @return the user name of this user group
281            */
282            @Override
283            public java.lang.String getUserName() {
284                    return _userGroup.getUserName();
285            }
286    
287            /**
288            * Returns the user uuid of this user group.
289            *
290            * @return the user uuid of this user group
291            */
292            @Override
293            public java.lang.String getUserUuid() {
294                    return _userGroup.getUserUuid();
295            }
296    
297            /**
298            * Returns the uuid of this user group.
299            *
300            * @return the uuid of this user group
301            */
302            @Override
303            public java.lang.String getUuid() {
304                    return _userGroup.getUuid();
305            }
306    
307            @Override
308            public java.lang.String toString() {
309                    return _userGroup.toString();
310            }
311    
312            @Override
313            public java.lang.String toXmlString() {
314                    return _userGroup.toXmlString();
315            }
316    
317            /**
318            * Returns the create date of this user group.
319            *
320            * @return the create date of this user group
321            */
322            @Override
323            public Date getCreateDate() {
324                    return _userGroup.getCreateDate();
325            }
326    
327            /**
328            * Returns the modified date of this user group.
329            *
330            * @return the modified date of this user group
331            */
332            @Override
333            public Date getModifiedDate() {
334                    return _userGroup.getModifiedDate();
335            }
336    
337            /**
338            * Returns the company ID of this user group.
339            *
340            * @return the company ID of this user group
341            */
342            @Override
343            public long getCompanyId() {
344                    return _userGroup.getCompanyId();
345            }
346    
347            @Override
348            public long getGroupId()
349                    throws com.liferay.portal.kernel.exception.PortalException {
350                    return _userGroup.getGroupId();
351            }
352    
353            /**
354            * Returns the mvcc version of this user group.
355            *
356            * @return the mvcc version of this user group
357            */
358            @Override
359            public long getMvccVersion() {
360                    return _userGroup.getMvccVersion();
361            }
362    
363            /**
364            * Returns the parent user group ID of this user group.
365            *
366            * @return the parent user group ID of this user group
367            */
368            @Override
369            public long getParentUserGroupId() {
370                    return _userGroup.getParentUserGroupId();
371            }
372    
373            /**
374            * Returns the primary key of this user group.
375            *
376            * @return the primary key of this user group
377            */
378            @Override
379            public long getPrimaryKey() {
380                    return _userGroup.getPrimaryKey();
381            }
382    
383            /**
384            * Returns the user group ID of this user group.
385            *
386            * @return the user group ID of this user group
387            */
388            @Override
389            public long getUserGroupId() {
390                    return _userGroup.getUserGroupId();
391            }
392    
393            /**
394            * Returns the user ID of this user group.
395            *
396            * @return the user ID of this user group
397            */
398            @Override
399            public long getUserId() {
400                    return _userGroup.getUserId();
401            }
402    
403            @Override
404            public void persist() {
405                    _userGroup.persist();
406            }
407    
408            /**
409            * Sets whether this user group is added by l d a p import.
410            *
411            * @param addedByLDAPImport the added by l d a p import of this user group
412            */
413            @Override
414            public void setAddedByLDAPImport(boolean addedByLDAPImport) {
415                    _userGroup.setAddedByLDAPImport(addedByLDAPImport);
416            }
417    
418            @Override
419            public void setCachedModel(boolean cachedModel) {
420                    _userGroup.setCachedModel(cachedModel);
421            }
422    
423            /**
424            * Sets the company ID of this user group.
425            *
426            * @param companyId the company ID of this user group
427            */
428            @Override
429            public void setCompanyId(long companyId) {
430                    _userGroup.setCompanyId(companyId);
431            }
432    
433            /**
434            * Sets the create date of this user group.
435            *
436            * @param createDate the create date of this user group
437            */
438            @Override
439            public void setCreateDate(Date createDate) {
440                    _userGroup.setCreateDate(createDate);
441            }
442    
443            /**
444            * Sets the description of this user group.
445            *
446            * @param description the description of this user group
447            */
448            @Override
449            public void setDescription(java.lang.String description) {
450                    _userGroup.setDescription(description);
451            }
452    
453            @Override
454            public void setExpandoBridgeAttributes(BaseModel<?> baseModel) {
455                    _userGroup.setExpandoBridgeAttributes(baseModel);
456            }
457    
458            @Override
459            public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge) {
460                    _userGroup.setExpandoBridgeAttributes(expandoBridge);
461            }
462    
463            @Override
464            public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
465                    _userGroup.setExpandoBridgeAttributes(serviceContext);
466            }
467    
468            /**
469            * Sets the modified date of this user group.
470            *
471            * @param modifiedDate the modified date of this user group
472            */
473            @Override
474            public void setModifiedDate(Date modifiedDate) {
475                    _userGroup.setModifiedDate(modifiedDate);
476            }
477    
478            /**
479            * Sets the mvcc version of this user group.
480            *
481            * @param mvccVersion the mvcc version of this user group
482            */
483            @Override
484            public void setMvccVersion(long mvccVersion) {
485                    _userGroup.setMvccVersion(mvccVersion);
486            }
487    
488            /**
489            * Sets the name of this user group.
490            *
491            * @param name the name of this user group
492            */
493            @Override
494            public void setName(java.lang.String name) {
495                    _userGroup.setName(name);
496            }
497    
498            @Override
499            public void setNew(boolean n) {
500                    _userGroup.setNew(n);
501            }
502    
503            /**
504            * Sets the parent user group ID of this user group.
505            *
506            * @param parentUserGroupId the parent user group ID of this user group
507            */
508            @Override
509            public void setParentUserGroupId(long parentUserGroupId) {
510                    _userGroup.setParentUserGroupId(parentUserGroupId);
511            }
512    
513            /**
514            * Sets the primary key of this user group.
515            *
516            * @param primaryKey the primary key of this user group
517            */
518            @Override
519            public void setPrimaryKey(long primaryKey) {
520                    _userGroup.setPrimaryKey(primaryKey);
521            }
522    
523            @Override
524            public void setPrimaryKeyObj(Serializable primaryKeyObj) {
525                    _userGroup.setPrimaryKeyObj(primaryKeyObj);
526            }
527    
528            /**
529            * Sets the user group ID of this user group.
530            *
531            * @param userGroupId the user group ID of this user group
532            */
533            @Override
534            public void setUserGroupId(long userGroupId) {
535                    _userGroup.setUserGroupId(userGroupId);
536            }
537    
538            /**
539            * Sets the user ID of this user group.
540            *
541            * @param userId the user ID of this user group
542            */
543            @Override
544            public void setUserId(long userId) {
545                    _userGroup.setUserId(userId);
546            }
547    
548            /**
549            * Sets the user name of this user group.
550            *
551            * @param userName the user name of this user group
552            */
553            @Override
554            public void setUserName(java.lang.String userName) {
555                    _userGroup.setUserName(userName);
556            }
557    
558            /**
559            * Sets the user uuid of this user group.
560            *
561            * @param userUuid the user uuid of this user group
562            */
563            @Override
564            public void setUserUuid(java.lang.String userUuid) {
565                    _userGroup.setUserUuid(userUuid);
566            }
567    
568            /**
569            * Sets the uuid of this user group.
570            *
571            * @param uuid the uuid of this user group
572            */
573            @Override
574            public void setUuid(java.lang.String uuid) {
575                    _userGroup.setUuid(uuid);
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 (Objects.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    }