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