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