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