001    /**
002     * Copyright (c) 2000-2012 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 java.util.HashMap;
018    import java.util.Map;
019    
020    /**
021     * <p>
022     * This class is a wrapper for {@link UserGroup}.
023     * </p>
024     *
025     * @author    Brian Wing Shun Chan
026     * @see       UserGroup
027     * @generated
028     */
029    public class UserGroupWrapper implements UserGroup, ModelWrapper<UserGroup> {
030            public UserGroupWrapper(UserGroup userGroup) {
031                    _userGroup = userGroup;
032            }
033    
034            public Class<?> getModelClass() {
035                    return UserGroup.class;
036            }
037    
038            public String getModelClassName() {
039                    return UserGroup.class.getName();
040            }
041    
042            public Map<String, Object> getModelAttributes() {
043                    Map<String, Object> attributes = new HashMap<String, Object>();
044    
045                    attributes.put("userGroupId", getUserGroupId());
046                    attributes.put("companyId", getCompanyId());
047                    attributes.put("parentUserGroupId", getParentUserGroupId());
048                    attributes.put("name", getName());
049                    attributes.put("description", getDescription());
050                    attributes.put("addedByLDAPImport", getAddedByLDAPImport());
051    
052                    return attributes;
053            }
054    
055            public void setModelAttributes(Map<String, Object> attributes) {
056                    Long userGroupId = (Long)attributes.get("userGroupId");
057    
058                    if (userGroupId != null) {
059                            setUserGroupId(userGroupId);
060                    }
061    
062                    Long companyId = (Long)attributes.get("companyId");
063    
064                    if (companyId != null) {
065                            setCompanyId(companyId);
066                    }
067    
068                    Long parentUserGroupId = (Long)attributes.get("parentUserGroupId");
069    
070                    if (parentUserGroupId != null) {
071                            setParentUserGroupId(parentUserGroupId);
072                    }
073    
074                    String name = (String)attributes.get("name");
075    
076                    if (name != null) {
077                            setName(name);
078                    }
079    
080                    String description = (String)attributes.get("description");
081    
082                    if (description != null) {
083                            setDescription(description);
084                    }
085    
086                    Boolean addedByLDAPImport = (Boolean)attributes.get("addedByLDAPImport");
087    
088                    if (addedByLDAPImport != null) {
089                            setAddedByLDAPImport(addedByLDAPImport);
090                    }
091            }
092    
093            /**
094            * Returns the primary key of this user group.
095            *
096            * @return the primary key of this user group
097            */
098            public long getPrimaryKey() {
099                    return _userGroup.getPrimaryKey();
100            }
101    
102            /**
103            * Sets the primary key of this user group.
104            *
105            * @param primaryKey the primary key of this user group
106            */
107            public void setPrimaryKey(long primaryKey) {
108                    _userGroup.setPrimaryKey(primaryKey);
109            }
110    
111            /**
112            * Returns the user group ID of this user group.
113            *
114            * @return the user group ID of this user group
115            */
116            public long getUserGroupId() {
117                    return _userGroup.getUserGroupId();
118            }
119    
120            /**
121            * Sets the user group ID of this user group.
122            *
123            * @param userGroupId the user group ID of this user group
124            */
125            public void setUserGroupId(long userGroupId) {
126                    _userGroup.setUserGroupId(userGroupId);
127            }
128    
129            /**
130            * Returns the company ID of this user group.
131            *
132            * @return the company ID of this user group
133            */
134            public long getCompanyId() {
135                    return _userGroup.getCompanyId();
136            }
137    
138            /**
139            * Sets the company ID of this user group.
140            *
141            * @param companyId the company ID of this user group
142            */
143            public void setCompanyId(long companyId) {
144                    _userGroup.setCompanyId(companyId);
145            }
146    
147            /**
148            * Returns the parent user group ID of this user group.
149            *
150            * @return the parent user group ID of this user group
151            */
152            public long getParentUserGroupId() {
153                    return _userGroup.getParentUserGroupId();
154            }
155    
156            /**
157            * Sets the parent user group ID of this user group.
158            *
159            * @param parentUserGroupId the parent user group ID of this user group
160            */
161            public void setParentUserGroupId(long parentUserGroupId) {
162                    _userGroup.setParentUserGroupId(parentUserGroupId);
163            }
164    
165            /**
166            * Returns the name of this user group.
167            *
168            * @return the name of this user group
169            */
170            public java.lang.String getName() {
171                    return _userGroup.getName();
172            }
173    
174            /**
175            * Sets the name of this user group.
176            *
177            * @param name the name of this user group
178            */
179            public void setName(java.lang.String name) {
180                    _userGroup.setName(name);
181            }
182    
183            /**
184            * Returns the description of this user group.
185            *
186            * @return the description of this user group
187            */
188            public java.lang.String getDescription() {
189                    return _userGroup.getDescription();
190            }
191    
192            /**
193            * Sets the description of this user group.
194            *
195            * @param description the description of this user group
196            */
197            public void setDescription(java.lang.String description) {
198                    _userGroup.setDescription(description);
199            }
200    
201            /**
202            * Returns the added by l d a p import of this user group.
203            *
204            * @return the added by l d a p import of this user group
205            */
206            public boolean getAddedByLDAPImport() {
207                    return _userGroup.getAddedByLDAPImport();
208            }
209    
210            /**
211            * Returns <code>true</code> if this user group is added by l d a p import.
212            *
213            * @return <code>true</code> if this user group is added by l d a p import; <code>false</code> otherwise
214            */
215            public boolean isAddedByLDAPImport() {
216                    return _userGroup.isAddedByLDAPImport();
217            }
218    
219            /**
220            * Sets whether this user group is added by l d a p import.
221            *
222            * @param addedByLDAPImport the added by l d a p import of this user group
223            */
224            public void setAddedByLDAPImport(boolean addedByLDAPImport) {
225                    _userGroup.setAddedByLDAPImport(addedByLDAPImport);
226            }
227    
228            public boolean isNew() {
229                    return _userGroup.isNew();
230            }
231    
232            public void setNew(boolean n) {
233                    _userGroup.setNew(n);
234            }
235    
236            public boolean isCachedModel() {
237                    return _userGroup.isCachedModel();
238            }
239    
240            public void setCachedModel(boolean cachedModel) {
241                    _userGroup.setCachedModel(cachedModel);
242            }
243    
244            public boolean isEscapedModel() {
245                    return _userGroup.isEscapedModel();
246            }
247    
248            public java.io.Serializable getPrimaryKeyObj() {
249                    return _userGroup.getPrimaryKeyObj();
250            }
251    
252            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
253                    _userGroup.setPrimaryKeyObj(primaryKeyObj);
254            }
255    
256            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
257                    return _userGroup.getExpandoBridge();
258            }
259    
260            public void setExpandoBridgeAttributes(
261                    com.liferay.portal.service.ServiceContext serviceContext) {
262                    _userGroup.setExpandoBridgeAttributes(serviceContext);
263            }
264    
265            @Override
266            public java.lang.Object clone() {
267                    return new UserGroupWrapper((UserGroup)_userGroup.clone());
268            }
269    
270            public int compareTo(com.liferay.portal.model.UserGroup userGroup) {
271                    return _userGroup.compareTo(userGroup);
272            }
273    
274            @Override
275            public int hashCode() {
276                    return _userGroup.hashCode();
277            }
278    
279            public com.liferay.portal.model.CacheModel<com.liferay.portal.model.UserGroup> toCacheModel() {
280                    return _userGroup.toCacheModel();
281            }
282    
283            public com.liferay.portal.model.UserGroup toEscapedModel() {
284                    return new UserGroupWrapper(_userGroup.toEscapedModel());
285            }
286    
287            public com.liferay.portal.model.UserGroup toUnescapedModel() {
288                    return new UserGroupWrapper(_userGroup.toUnescapedModel());
289            }
290    
291            @Override
292            public java.lang.String toString() {
293                    return _userGroup.toString();
294            }
295    
296            public java.lang.String toXmlString() {
297                    return _userGroup.toXmlString();
298            }
299    
300            public void persist()
301                    throws com.liferay.portal.kernel.exception.SystemException {
302                    _userGroup.persist();
303            }
304    
305            public com.liferay.portal.model.Group getGroup()
306                    throws com.liferay.portal.kernel.exception.PortalException,
307                            com.liferay.portal.kernel.exception.SystemException {
308                    return _userGroup.getGroup();
309            }
310    
311            public int getPrivateLayoutsPageCount()
312                    throws com.liferay.portal.kernel.exception.PortalException,
313                            com.liferay.portal.kernel.exception.SystemException {
314                    return _userGroup.getPrivateLayoutsPageCount();
315            }
316    
317            public int getPublicLayoutsPageCount()
318                    throws com.liferay.portal.kernel.exception.PortalException,
319                            com.liferay.portal.kernel.exception.SystemException {
320                    return _userGroup.getPublicLayoutsPageCount();
321            }
322    
323            public boolean hasPrivateLayouts()
324                    throws com.liferay.portal.kernel.exception.PortalException,
325                            com.liferay.portal.kernel.exception.SystemException {
326                    return _userGroup.hasPrivateLayouts();
327            }
328    
329            public boolean hasPublicLayouts()
330                    throws com.liferay.portal.kernel.exception.PortalException,
331                            com.liferay.portal.kernel.exception.SystemException {
332                    return _userGroup.hasPublicLayouts();
333            }
334    
335            /**
336             * @deprecated Renamed to {@link #getWrappedModel}
337             */
338            public UserGroup getWrappedUserGroup() {
339                    return _userGroup;
340            }
341    
342            public UserGroup getWrappedModel() {
343                    return _userGroup;
344            }
345    
346            public void resetOriginalValues() {
347                    _userGroup.resetOriginalValues();
348            }
349    
350            private UserGroup _userGroup;
351    }