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.lar.StagedModelType;
020    import com.liferay.portal.kernel.util.Validator;
021    
022    import java.util.Date;
023    import java.util.HashMap;
024    import java.util.Map;
025    
026    /**
027     * <p>
028     * This class is a wrapper for {@link UserGroup}.
029     * </p>
030     *
031     * @author Brian Wing Shun Chan
032     * @see UserGroup
033     * @generated
034     */
035    @ProviderType
036    public class UserGroupWrapper implements UserGroup, ModelWrapper<UserGroup> {
037            public UserGroupWrapper(UserGroup userGroup) {
038                    _userGroup = userGroup;
039            }
040    
041            @Override
042            public Class<?> getModelClass() {
043                    return UserGroup.class;
044            }
045    
046            @Override
047            public String getModelClassName() {
048                    return UserGroup.class.getName();
049            }
050    
051            @Override
052            public Map<String, Object> getModelAttributes() {
053                    Map<String, Object> attributes = new HashMap<String, Object>();
054    
055                    attributes.put("mvccVersion", getMvccVersion());
056                    attributes.put("uuid", getUuid());
057                    attributes.put("userGroupId", getUserGroupId());
058                    attributes.put("companyId", getCompanyId());
059                    attributes.put("userId", getUserId());
060                    attributes.put("userName", getUserName());
061                    attributes.put("createDate", getCreateDate());
062                    attributes.put("modifiedDate", getModifiedDate());
063                    attributes.put("parentUserGroupId", getParentUserGroupId());
064                    attributes.put("name", getName());
065                    attributes.put("description", getDescription());
066                    attributes.put("addedByLDAPImport", getAddedByLDAPImport());
067    
068                    return attributes;
069            }
070    
071            @Override
072            public void setModelAttributes(Map<String, Object> attributes) {
073                    Long mvccVersion = (Long)attributes.get("mvccVersion");
074    
075                    if (mvccVersion != null) {
076                            setMvccVersion(mvccVersion);
077                    }
078    
079                    String uuid = (String)attributes.get("uuid");
080    
081                    if (uuid != null) {
082                            setUuid(uuid);
083                    }
084    
085                    Long userGroupId = (Long)attributes.get("userGroupId");
086    
087                    if (userGroupId != null) {
088                            setUserGroupId(userGroupId);
089                    }
090    
091                    Long companyId = (Long)attributes.get("companyId");
092    
093                    if (companyId != null) {
094                            setCompanyId(companyId);
095                    }
096    
097                    Long userId = (Long)attributes.get("userId");
098    
099                    if (userId != null) {
100                            setUserId(userId);
101                    }
102    
103                    String userName = (String)attributes.get("userName");
104    
105                    if (userName != null) {
106                            setUserName(userName);
107                    }
108    
109                    Date createDate = (Date)attributes.get("createDate");
110    
111                    if (createDate != null) {
112                            setCreateDate(createDate);
113                    }
114    
115                    Date modifiedDate = (Date)attributes.get("modifiedDate");
116    
117                    if (modifiedDate != null) {
118                            setModifiedDate(modifiedDate);
119                    }
120    
121                    Long parentUserGroupId = (Long)attributes.get("parentUserGroupId");
122    
123                    if (parentUserGroupId != null) {
124                            setParentUserGroupId(parentUserGroupId);
125                    }
126    
127                    String name = (String)attributes.get("name");
128    
129                    if (name != null) {
130                            setName(name);
131                    }
132    
133                    String description = (String)attributes.get("description");
134    
135                    if (description != null) {
136                            setDescription(description);
137                    }
138    
139                    Boolean addedByLDAPImport = (Boolean)attributes.get("addedByLDAPImport");
140    
141                    if (addedByLDAPImport != null) {
142                            setAddedByLDAPImport(addedByLDAPImport);
143                    }
144            }
145    
146            @Override
147            public java.lang.Object clone() {
148                    return new UserGroupWrapper((UserGroup)_userGroup.clone());
149            }
150    
151            @Override
152            public int compareTo(com.liferay.portal.model.UserGroup userGroup) {
153                    return _userGroup.compareTo(userGroup);
154            }
155    
156            /**
157            * Returns the added by l d a p import of this user group.
158            *
159            * @return the added by l d a p import of this user group
160            */
161            @Override
162            public boolean getAddedByLDAPImport() {
163                    return _userGroup.getAddedByLDAPImport();
164            }
165    
166            /**
167            * Returns the company ID of this user group.
168            *
169            * @return the company ID of this user group
170            */
171            @Override
172            public long getCompanyId() {
173                    return _userGroup.getCompanyId();
174            }
175    
176            /**
177            * Returns the create date of this user group.
178            *
179            * @return the create date of this user group
180            */
181            @Override
182            public java.util.Date getCreateDate() {
183                    return _userGroup.getCreateDate();
184            }
185    
186            /**
187            * Returns the description of this user group.
188            *
189            * @return the description of this user group
190            */
191            @Override
192            public java.lang.String getDescription() {
193                    return _userGroup.getDescription();
194            }
195    
196            @Override
197            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
198                    return _userGroup.getExpandoBridge();
199            }
200    
201            @Override
202            public com.liferay.portal.model.Group getGroup()
203                    throws com.liferay.portal.kernel.exception.PortalException {
204                    return _userGroup.getGroup();
205            }
206    
207            @Override
208            public long getGroupId()
209                    throws com.liferay.portal.kernel.exception.PortalException {
210                    return _userGroup.getGroupId();
211            }
212    
213            /**
214            * Returns the modified date of this user group.
215            *
216            * @return the modified date of this user group
217            */
218            @Override
219            public java.util.Date getModifiedDate() {
220                    return _userGroup.getModifiedDate();
221            }
222    
223            /**
224            * Returns the mvcc version of this user group.
225            *
226            * @return the mvcc version of this user group
227            */
228            @Override
229            public long getMvccVersion() {
230                    return _userGroup.getMvccVersion();
231            }
232    
233            /**
234            * Returns the name of this user group.
235            *
236            * @return the name of this user group
237            */
238            @Override
239            public java.lang.String getName() {
240                    return _userGroup.getName();
241            }
242    
243            /**
244            * Returns the parent user group ID of this user group.
245            *
246            * @return the parent user group ID of this user group
247            */
248            @Override
249            public long getParentUserGroupId() {
250                    return _userGroup.getParentUserGroupId();
251            }
252    
253            /**
254            * Returns the primary key of this user group.
255            *
256            * @return the primary key of this user group
257            */
258            @Override
259            public long getPrimaryKey() {
260                    return _userGroup.getPrimaryKey();
261            }
262    
263            @Override
264            public java.io.Serializable getPrimaryKeyObj() {
265                    return _userGroup.getPrimaryKeyObj();
266            }
267    
268            @Override
269            public int getPrivateLayoutsPageCount()
270                    throws com.liferay.portal.kernel.exception.PortalException {
271                    return _userGroup.getPrivateLayoutsPageCount();
272            }
273    
274            @Override
275            public int getPublicLayoutsPageCount()
276                    throws com.liferay.portal.kernel.exception.PortalException {
277                    return _userGroup.getPublicLayoutsPageCount();
278            }
279    
280            /**
281            * Returns the user group ID of this user group.
282            *
283            * @return the user group ID of this user group
284            */
285            @Override
286            public long getUserGroupId() {
287                    return _userGroup.getUserGroupId();
288            }
289    
290            /**
291            * Returns the user ID of this user group.
292            *
293            * @return the user ID of this user group
294            */
295            @Override
296            public long getUserId() {
297                    return _userGroup.getUserId();
298            }
299    
300            /**
301            * Returns the user name of this user group.
302            *
303            * @return the user name of this user group
304            */
305            @Override
306            public java.lang.String getUserName() {
307                    return _userGroup.getUserName();
308            }
309    
310            /**
311            * Returns the user uuid of this user group.
312            *
313            * @return the user uuid of this user group
314            */
315            @Override
316            public java.lang.String getUserUuid() {
317                    return _userGroup.getUserUuid();
318            }
319    
320            /**
321            * Returns the uuid of this user group.
322            *
323            * @return the uuid of this user group
324            */
325            @Override
326            public java.lang.String getUuid() {
327                    return _userGroup.getUuid();
328            }
329    
330            @Override
331            public boolean hasPrivateLayouts()
332                    throws com.liferay.portal.kernel.exception.PortalException {
333                    return _userGroup.hasPrivateLayouts();
334            }
335    
336            @Override
337            public boolean hasPublicLayouts()
338                    throws com.liferay.portal.kernel.exception.PortalException {
339                    return _userGroup.hasPublicLayouts();
340            }
341    
342            @Override
343            public int hashCode() {
344                    return _userGroup.hashCode();
345            }
346    
347            /**
348            * Returns <code>true</code> if this user group is added by l d a p import.
349            *
350            * @return <code>true</code> if this user group is added by l d a p import; <code>false</code> otherwise
351            */
352            @Override
353            public boolean isAddedByLDAPImport() {
354                    return _userGroup.isAddedByLDAPImport();
355            }
356    
357            @Override
358            public boolean isCachedModel() {
359                    return _userGroup.isCachedModel();
360            }
361    
362            @Override
363            public boolean isEscapedModel() {
364                    return _userGroup.isEscapedModel();
365            }
366    
367            @Override
368            public boolean isNew() {
369                    return _userGroup.isNew();
370            }
371    
372            @Override
373            public void persist() {
374                    _userGroup.persist();
375            }
376    
377            /**
378            * Sets whether this user group is added by l d a p import.
379            *
380            * @param addedByLDAPImport the added by l d a p import of this user group
381            */
382            @Override
383            public void setAddedByLDAPImport(boolean addedByLDAPImport) {
384                    _userGroup.setAddedByLDAPImport(addedByLDAPImport);
385            }
386    
387            @Override
388            public void setCachedModel(boolean cachedModel) {
389                    _userGroup.setCachedModel(cachedModel);
390            }
391    
392            /**
393            * Sets the company ID of this user group.
394            *
395            * @param companyId the company ID of this user group
396            */
397            @Override
398            public void setCompanyId(long companyId) {
399                    _userGroup.setCompanyId(companyId);
400            }
401    
402            /**
403            * Sets the create date of this user group.
404            *
405            * @param createDate the create date of this user group
406            */
407            @Override
408            public void setCreateDate(java.util.Date createDate) {
409                    _userGroup.setCreateDate(createDate);
410            }
411    
412            /**
413            * Sets the description of this user group.
414            *
415            * @param description the description of this user group
416            */
417            @Override
418            public void setDescription(java.lang.String description) {
419                    _userGroup.setDescription(description);
420            }
421    
422            @Override
423            public void setExpandoBridgeAttributes(
424                    com.liferay.portal.model.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(java.util.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 com.liferay.portal.model.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    }