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