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