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