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 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.model.BaseModel<?> baseModel) {
180                    _userGroupGroupRole.setExpandoBridgeAttributes(baseModel);
181            }
182    
183            public void setExpandoBridgeAttributes(
184                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
185                    _userGroupGroupRole.setExpandoBridgeAttributes(expandoBridge);
186            }
187    
188            public void setExpandoBridgeAttributes(
189                    com.liferay.portal.service.ServiceContext serviceContext) {
190                    _userGroupGroupRole.setExpandoBridgeAttributes(serviceContext);
191            }
192    
193            @Override
194            public java.lang.Object clone() {
195                    return new UserGroupGroupRoleWrapper((UserGroupGroupRole)_userGroupGroupRole.clone());
196            }
197    
198            public int compareTo(
199                    com.liferay.portal.model.UserGroupGroupRole userGroupGroupRole) {
200                    return _userGroupGroupRole.compareTo(userGroupGroupRole);
201            }
202    
203            @Override
204            public int hashCode() {
205                    return _userGroupGroupRole.hashCode();
206            }
207    
208            public com.liferay.portal.model.CacheModel<com.liferay.portal.model.UserGroupGroupRole> toCacheModel() {
209                    return _userGroupGroupRole.toCacheModel();
210            }
211    
212            public com.liferay.portal.model.UserGroupGroupRole toEscapedModel() {
213                    return new UserGroupGroupRoleWrapper(_userGroupGroupRole.toEscapedModel());
214            }
215    
216            public com.liferay.portal.model.UserGroupGroupRole toUnescapedModel() {
217                    return new UserGroupGroupRoleWrapper(_userGroupGroupRole.toUnescapedModel());
218            }
219    
220            @Override
221            public java.lang.String toString() {
222                    return _userGroupGroupRole.toString();
223            }
224    
225            public java.lang.String toXmlString() {
226                    return _userGroupGroupRole.toXmlString();
227            }
228    
229            public void persist()
230                    throws com.liferay.portal.kernel.exception.SystemException {
231                    _userGroupGroupRole.persist();
232            }
233    
234            /**
235             * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel}
236             */
237            public UserGroupGroupRole getWrappedUserGroupGroupRole() {
238                    return _userGroupGroupRole;
239            }
240    
241            public UserGroupGroupRole getWrappedModel() {
242                    return _userGroupGroupRole;
243            }
244    
245            public void resetOriginalValues() {
246                    _userGroupGroupRole.resetOriginalValues();
247            }
248    
249            private UserGroupGroupRole _userGroupGroupRole;
250    }