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 UserGroupGroupRole}.
023     * </p>
024     *
025     * @author    Brian Wing Shun Chan
026     * @see       UserGroupGroupRole
027     * @generated
028     */
029    public class UserGroupGroupRoleWrapper implements UserGroupGroupRole,
030            ModelWrapper<UserGroupGroupRole> {
031            public UserGroupGroupRoleWrapper(UserGroupGroupRole userGroupGroupRole) {
032                    _userGroupGroupRole = userGroupGroupRole;
033            }
034    
035            public Class<?> getModelClass() {
036                    return UserGroupGroupRole.class;
037            }
038    
039            public String getModelClassName() {
040                    return UserGroupGroupRole.class.getName();
041            }
042    
043            public Map<String, Object> getModelAttributes() {
044                    Map<String, Object> attributes = new HashMap<String, Object>();
045    
046                    attributes.put("userGroupId", getUserGroupId());
047                    attributes.put("groupId", getGroupId());
048                    attributes.put("roleId", getRoleId());
049    
050                    return attributes;
051            }
052    
053            public void setModelAttributes(Map<String, Object> attributes) {
054                    Long userGroupId = (Long)attributes.get("userGroupId");
055    
056                    if (userGroupId != null) {
057                            setUserGroupId(userGroupId);
058                    }
059    
060                    Long groupId = (Long)attributes.get("groupId");
061    
062                    if (groupId != null) {
063                            setGroupId(groupId);
064                    }
065    
066                    Long roleId = (Long)attributes.get("roleId");
067    
068                    if (roleId != null) {
069                            setRoleId(roleId);
070                    }
071            }
072    
073            /**
074            * Returns the primary key of this user group group role.
075            *
076            * @return the primary key of this user group group role
077            */
078            public com.liferay.portal.service.persistence.UserGroupGroupRolePK getPrimaryKey() {
079                    return _userGroupGroupRole.getPrimaryKey();
080            }
081    
082            /**
083            * Sets the primary key of this user group group role.
084            *
085            * @param primaryKey the primary key of this user group group role
086            */
087            public void setPrimaryKey(
088                    com.liferay.portal.service.persistence.UserGroupGroupRolePK primaryKey) {
089                    _userGroupGroupRole.setPrimaryKey(primaryKey);
090            }
091    
092            /**
093            * Returns the user group ID of this user group group role.
094            *
095            * @return the user group ID of this user group group role
096            */
097            public long getUserGroupId() {
098                    return _userGroupGroupRole.getUserGroupId();
099            }
100    
101            /**
102            * Sets the user group ID of this user group group role.
103            *
104            * @param userGroupId the user group ID of this user group group role
105            */
106            public void setUserGroupId(long userGroupId) {
107                    _userGroupGroupRole.setUserGroupId(userGroupId);
108            }
109    
110            /**
111            * Returns the group ID of this user group group role.
112            *
113            * @return the group ID of this user group group role
114            */
115            public long getGroupId() {
116                    return _userGroupGroupRole.getGroupId();
117            }
118    
119            /**
120            * Sets the group ID of this user group group role.
121            *
122            * @param groupId the group ID of this user group group role
123            */
124            public void setGroupId(long groupId) {
125                    _userGroupGroupRole.setGroupId(groupId);
126            }
127    
128            /**
129            * Returns the role ID of this user group group role.
130            *
131            * @return the role ID of this user group group role
132            */
133            public long getRoleId() {
134                    return _userGroupGroupRole.getRoleId();
135            }
136    
137            /**
138            * Sets the role ID of this user group group role.
139            *
140            * @param roleId the role ID of this user group group role
141            */
142            public void setRoleId(long roleId) {
143                    _userGroupGroupRole.setRoleId(roleId);
144            }
145    
146            public boolean isNew() {
147                    return _userGroupGroupRole.isNew();
148            }
149    
150            public void setNew(boolean n) {
151                    _userGroupGroupRole.setNew(n);
152            }
153    
154            public boolean isCachedModel() {
155                    return _userGroupGroupRole.isCachedModel();
156            }
157    
158            public void setCachedModel(boolean cachedModel) {
159                    _userGroupGroupRole.setCachedModel(cachedModel);
160            }
161    
162            public boolean isEscapedModel() {
163                    return _userGroupGroupRole.isEscapedModel();
164            }
165    
166            public java.io.Serializable getPrimaryKeyObj() {
167                    return _userGroupGroupRole.getPrimaryKeyObj();
168            }
169    
170            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
171                    _userGroupGroupRole.setPrimaryKeyObj(primaryKeyObj);
172            }
173    
174            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
175                    return _userGroupGroupRole.getExpandoBridge();
176            }
177    
178            public void setExpandoBridgeAttributes(
179                    com.liferay.portal.service.ServiceContext serviceContext) {
180                    _userGroupGroupRole.setExpandoBridgeAttributes(serviceContext);
181            }
182    
183            @Override
184            public java.lang.Object clone() {
185                    return new UserGroupGroupRoleWrapper((UserGroupGroupRole)_userGroupGroupRole.clone());
186            }
187    
188            public int compareTo(
189                    com.liferay.portal.model.UserGroupGroupRole userGroupGroupRole) {
190                    return _userGroupGroupRole.compareTo(userGroupGroupRole);
191            }
192    
193            @Override
194            public int hashCode() {
195                    return _userGroupGroupRole.hashCode();
196            }
197    
198            public com.liferay.portal.model.CacheModel<com.liferay.portal.model.UserGroupGroupRole> toCacheModel() {
199                    return _userGroupGroupRole.toCacheModel();
200            }
201    
202            public com.liferay.portal.model.UserGroupGroupRole toEscapedModel() {
203                    return new UserGroupGroupRoleWrapper(_userGroupGroupRole.toEscapedModel());
204            }
205    
206            public com.liferay.portal.model.UserGroupGroupRole toUnescapedModel() {
207                    return new UserGroupGroupRoleWrapper(_userGroupGroupRole.toUnescapedModel());
208            }
209    
210            @Override
211            public java.lang.String toString() {
212                    return _userGroupGroupRole.toString();
213            }
214    
215            public java.lang.String toXmlString() {
216                    return _userGroupGroupRole.toXmlString();
217            }
218    
219            public void persist()
220                    throws com.liferay.portal.kernel.exception.SystemException {
221                    _userGroupGroupRole.persist();
222            }
223    
224            /**
225             * @deprecated Renamed to {@link #getWrappedModel}
226             */
227            public UserGroupGroupRole getWrappedUserGroupGroupRole() {
228                    return _userGroupGroupRole;
229            }
230    
231            public UserGroupGroupRole getWrappedModel() {
232                    return _userGroupGroupRole;
233            }
234    
235            public void resetOriginalValues() {
236                    _userGroupGroupRole.resetOriginalValues();
237            }
238    
239            private UserGroupGroupRole _userGroupGroupRole;
240    }