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 ResourceTypePermission}.
023     * </p>
024     *
025     * @author    Brian Wing Shun Chan
026     * @see       ResourceTypePermission
027     * @generated
028     */
029    public class ResourceTypePermissionWrapper implements ResourceTypePermission,
030            ModelWrapper<ResourceTypePermission> {
031            public ResourceTypePermissionWrapper(
032                    ResourceTypePermission resourceTypePermission) {
033                    _resourceTypePermission = resourceTypePermission;
034            }
035    
036            public Class<?> getModelClass() {
037                    return ResourceTypePermission.class;
038            }
039    
040            public String getModelClassName() {
041                    return ResourceTypePermission.class.getName();
042            }
043    
044            public Map<String, Object> getModelAttributes() {
045                    Map<String, Object> attributes = new HashMap<String, Object>();
046    
047                    attributes.put("resourceTypePermissionId", getResourceTypePermissionId());
048                    attributes.put("companyId", getCompanyId());
049                    attributes.put("groupId", getGroupId());
050                    attributes.put("name", getName());
051                    attributes.put("roleId", getRoleId());
052                    attributes.put("actionIds", getActionIds());
053    
054                    return attributes;
055            }
056    
057            public void setModelAttributes(Map<String, Object> attributes) {
058                    Long resourceTypePermissionId = (Long)attributes.get(
059                                    "resourceTypePermissionId");
060    
061                    if (resourceTypePermissionId != null) {
062                            setResourceTypePermissionId(resourceTypePermissionId);
063                    }
064    
065                    Long companyId = (Long)attributes.get("companyId");
066    
067                    if (companyId != null) {
068                            setCompanyId(companyId);
069                    }
070    
071                    Long groupId = (Long)attributes.get("groupId");
072    
073                    if (groupId != null) {
074                            setGroupId(groupId);
075                    }
076    
077                    String name = (String)attributes.get("name");
078    
079                    if (name != null) {
080                            setName(name);
081                    }
082    
083                    Long roleId = (Long)attributes.get("roleId");
084    
085                    if (roleId != null) {
086                            setRoleId(roleId);
087                    }
088    
089                    Long actionIds = (Long)attributes.get("actionIds");
090    
091                    if (actionIds != null) {
092                            setActionIds(actionIds);
093                    }
094            }
095    
096            /**
097            * Returns the primary key of this resource type permission.
098            *
099            * @return the primary key of this resource type permission
100            */
101            public long getPrimaryKey() {
102                    return _resourceTypePermission.getPrimaryKey();
103            }
104    
105            /**
106            * Sets the primary key of this resource type permission.
107            *
108            * @param primaryKey the primary key of this resource type permission
109            */
110            public void setPrimaryKey(long primaryKey) {
111                    _resourceTypePermission.setPrimaryKey(primaryKey);
112            }
113    
114            /**
115            * Returns the resource type permission ID of this resource type permission.
116            *
117            * @return the resource type permission ID of this resource type permission
118            */
119            public long getResourceTypePermissionId() {
120                    return _resourceTypePermission.getResourceTypePermissionId();
121            }
122    
123            /**
124            * Sets the resource type permission ID of this resource type permission.
125            *
126            * @param resourceTypePermissionId the resource type permission ID of this resource type permission
127            */
128            public void setResourceTypePermissionId(long resourceTypePermissionId) {
129                    _resourceTypePermission.setResourceTypePermissionId(resourceTypePermissionId);
130            }
131    
132            /**
133            * Returns the company ID of this resource type permission.
134            *
135            * @return the company ID of this resource type permission
136            */
137            public long getCompanyId() {
138                    return _resourceTypePermission.getCompanyId();
139            }
140    
141            /**
142            * Sets the company ID of this resource type permission.
143            *
144            * @param companyId the company ID of this resource type permission
145            */
146            public void setCompanyId(long companyId) {
147                    _resourceTypePermission.setCompanyId(companyId);
148            }
149    
150            /**
151            * Returns the group ID of this resource type permission.
152            *
153            * @return the group ID of this resource type permission
154            */
155            public long getGroupId() {
156                    return _resourceTypePermission.getGroupId();
157            }
158    
159            /**
160            * Sets the group ID of this resource type permission.
161            *
162            * @param groupId the group ID of this resource type permission
163            */
164            public void setGroupId(long groupId) {
165                    _resourceTypePermission.setGroupId(groupId);
166            }
167    
168            /**
169            * Returns the name of this resource type permission.
170            *
171            * @return the name of this resource type permission
172            */
173            public java.lang.String getName() {
174                    return _resourceTypePermission.getName();
175            }
176    
177            /**
178            * Sets the name of this resource type permission.
179            *
180            * @param name the name of this resource type permission
181            */
182            public void setName(java.lang.String name) {
183                    _resourceTypePermission.setName(name);
184            }
185    
186            /**
187            * Returns the role ID of this resource type permission.
188            *
189            * @return the role ID of this resource type permission
190            */
191            public long getRoleId() {
192                    return _resourceTypePermission.getRoleId();
193            }
194    
195            /**
196            * Sets the role ID of this resource type permission.
197            *
198            * @param roleId the role ID of this resource type permission
199            */
200            public void setRoleId(long roleId) {
201                    _resourceTypePermission.setRoleId(roleId);
202            }
203    
204            /**
205            * Returns the action IDs of this resource type permission.
206            *
207            * @return the action IDs of this resource type permission
208            */
209            public long getActionIds() {
210                    return _resourceTypePermission.getActionIds();
211            }
212    
213            /**
214            * Sets the action IDs of this resource type permission.
215            *
216            * @param actionIds the action IDs of this resource type permission
217            */
218            public void setActionIds(long actionIds) {
219                    _resourceTypePermission.setActionIds(actionIds);
220            }
221    
222            public boolean isNew() {
223                    return _resourceTypePermission.isNew();
224            }
225    
226            public void setNew(boolean n) {
227                    _resourceTypePermission.setNew(n);
228            }
229    
230            public boolean isCachedModel() {
231                    return _resourceTypePermission.isCachedModel();
232            }
233    
234            public void setCachedModel(boolean cachedModel) {
235                    _resourceTypePermission.setCachedModel(cachedModel);
236            }
237    
238            public boolean isEscapedModel() {
239                    return _resourceTypePermission.isEscapedModel();
240            }
241    
242            public java.io.Serializable getPrimaryKeyObj() {
243                    return _resourceTypePermission.getPrimaryKeyObj();
244            }
245    
246            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
247                    _resourceTypePermission.setPrimaryKeyObj(primaryKeyObj);
248            }
249    
250            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
251                    return _resourceTypePermission.getExpandoBridge();
252            }
253    
254            public void setExpandoBridgeAttributes(
255                    com.liferay.portal.service.ServiceContext serviceContext) {
256                    _resourceTypePermission.setExpandoBridgeAttributes(serviceContext);
257            }
258    
259            @Override
260            public java.lang.Object clone() {
261                    return new ResourceTypePermissionWrapper((ResourceTypePermission)_resourceTypePermission.clone());
262            }
263    
264            public int compareTo(
265                    com.liferay.portal.model.ResourceTypePermission resourceTypePermission) {
266                    return _resourceTypePermission.compareTo(resourceTypePermission);
267            }
268    
269            @Override
270            public int hashCode() {
271                    return _resourceTypePermission.hashCode();
272            }
273    
274            public com.liferay.portal.model.CacheModel<com.liferay.portal.model.ResourceTypePermission> toCacheModel() {
275                    return _resourceTypePermission.toCacheModel();
276            }
277    
278            public com.liferay.portal.model.ResourceTypePermission toEscapedModel() {
279                    return new ResourceTypePermissionWrapper(_resourceTypePermission.toEscapedModel());
280            }
281    
282            @Override
283            public java.lang.String toString() {
284                    return _resourceTypePermission.toString();
285            }
286    
287            public java.lang.String toXmlString() {
288                    return _resourceTypePermission.toXmlString();
289            }
290    
291            public void persist()
292                    throws com.liferay.portal.kernel.exception.SystemException {
293                    _resourceTypePermission.persist();
294            }
295    
296            public boolean isCompanyScope() {
297                    return _resourceTypePermission.isCompanyScope();
298            }
299    
300            public boolean isGroupScope() {
301                    return _resourceTypePermission.isGroupScope();
302            }
303    
304            /**
305             * @deprecated Renamed to {@link #getWrappedModel}
306             */
307            public ResourceTypePermission getWrappedResourceTypePermission() {
308                    return _resourceTypePermission;
309            }
310    
311            public ResourceTypePermission getWrappedModel() {
312                    return _resourceTypePermission;
313            }
314    
315            public void resetOriginalValues() {
316                    _resourceTypePermission.resetOriginalValues();
317            }
318    
319            private ResourceTypePermission _resourceTypePermission;
320    }