001    /**
002     * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
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 ResourceCode}.
023     * </p>
024     *
025     * @author    Brian Wing Shun Chan
026     * @see       ResourceCode
027     * @generated
028     */
029    public class ResourceCodeWrapper implements ResourceCode,
030            ModelWrapper<ResourceCode> {
031            public ResourceCodeWrapper(ResourceCode resourceCode) {
032                    _resourceCode = resourceCode;
033            }
034    
035            public Class<?> getModelClass() {
036                    return ResourceCode.class;
037            }
038    
039            public String getModelClassName() {
040                    return ResourceCode.class.getName();
041            }
042    
043            public Map<String, Object> getModelAttributes() {
044                    Map<String, Object> attributes = new HashMap<String, Object>();
045    
046                    attributes.put("codeId", getCodeId());
047                    attributes.put("companyId", getCompanyId());
048                    attributes.put("name", getName());
049                    attributes.put("scope", getScope());
050    
051                    return attributes;
052            }
053    
054            public void setModelAttributes(Map<String, Object> attributes) {
055                    Long codeId = (Long)attributes.get("codeId");
056    
057                    if (codeId != null) {
058                            setCodeId(codeId);
059                    }
060    
061                    Long companyId = (Long)attributes.get("companyId");
062    
063                    if (companyId != null) {
064                            setCompanyId(companyId);
065                    }
066    
067                    String name = (String)attributes.get("name");
068    
069                    if (name != null) {
070                            setName(name);
071                    }
072    
073                    Integer scope = (Integer)attributes.get("scope");
074    
075                    if (scope != null) {
076                            setScope(scope);
077                    }
078            }
079    
080            /**
081            * Returns the primary key of this resource code.
082            *
083            * @return the primary key of this resource code
084            */
085            public long getPrimaryKey() {
086                    return _resourceCode.getPrimaryKey();
087            }
088    
089            /**
090            * Sets the primary key of this resource code.
091            *
092            * @param primaryKey the primary key of this resource code
093            */
094            public void setPrimaryKey(long primaryKey) {
095                    _resourceCode.setPrimaryKey(primaryKey);
096            }
097    
098            /**
099            * Returns the code ID of this resource code.
100            *
101            * @return the code ID of this resource code
102            */
103            public long getCodeId() {
104                    return _resourceCode.getCodeId();
105            }
106    
107            /**
108            * Sets the code ID of this resource code.
109            *
110            * @param codeId the code ID of this resource code
111            */
112            public void setCodeId(long codeId) {
113                    _resourceCode.setCodeId(codeId);
114            }
115    
116            /**
117            * Returns the company ID of this resource code.
118            *
119            * @return the company ID of this resource code
120            */
121            public long getCompanyId() {
122                    return _resourceCode.getCompanyId();
123            }
124    
125            /**
126            * Sets the company ID of this resource code.
127            *
128            * @param companyId the company ID of this resource code
129            */
130            public void setCompanyId(long companyId) {
131                    _resourceCode.setCompanyId(companyId);
132            }
133    
134            /**
135            * Returns the name of this resource code.
136            *
137            * @return the name of this resource code
138            */
139            public java.lang.String getName() {
140                    return _resourceCode.getName();
141            }
142    
143            /**
144            * Sets the name of this resource code.
145            *
146            * @param name the name of this resource code
147            */
148            public void setName(java.lang.String name) {
149                    _resourceCode.setName(name);
150            }
151    
152            /**
153            * Returns the scope of this resource code.
154            *
155            * @return the scope of this resource code
156            */
157            public int getScope() {
158                    return _resourceCode.getScope();
159            }
160    
161            /**
162            * Sets the scope of this resource code.
163            *
164            * @param scope the scope of this resource code
165            */
166            public void setScope(int scope) {
167                    _resourceCode.setScope(scope);
168            }
169    
170            public boolean isNew() {
171                    return _resourceCode.isNew();
172            }
173    
174            public void setNew(boolean n) {
175                    _resourceCode.setNew(n);
176            }
177    
178            public boolean isCachedModel() {
179                    return _resourceCode.isCachedModel();
180            }
181    
182            public void setCachedModel(boolean cachedModel) {
183                    _resourceCode.setCachedModel(cachedModel);
184            }
185    
186            public boolean isEscapedModel() {
187                    return _resourceCode.isEscapedModel();
188            }
189    
190            public java.io.Serializable getPrimaryKeyObj() {
191                    return _resourceCode.getPrimaryKeyObj();
192            }
193    
194            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
195                    _resourceCode.setPrimaryKeyObj(primaryKeyObj);
196            }
197    
198            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
199                    return _resourceCode.getExpandoBridge();
200            }
201    
202            public void setExpandoBridgeAttributes(
203                    com.liferay.portal.service.ServiceContext serviceContext) {
204                    _resourceCode.setExpandoBridgeAttributes(serviceContext);
205            }
206    
207            @Override
208            public java.lang.Object clone() {
209                    return new ResourceCodeWrapper((ResourceCode)_resourceCode.clone());
210            }
211    
212            public int compareTo(com.liferay.portal.model.ResourceCode resourceCode) {
213                    return _resourceCode.compareTo(resourceCode);
214            }
215    
216            @Override
217            public int hashCode() {
218                    return _resourceCode.hashCode();
219            }
220    
221            public com.liferay.portal.model.CacheModel<com.liferay.portal.model.ResourceCode> toCacheModel() {
222                    return _resourceCode.toCacheModel();
223            }
224    
225            public com.liferay.portal.model.ResourceCode toEscapedModel() {
226                    return new ResourceCodeWrapper(_resourceCode.toEscapedModel());
227            }
228    
229            @Override
230            public java.lang.String toString() {
231                    return _resourceCode.toString();
232            }
233    
234            public java.lang.String toXmlString() {
235                    return _resourceCode.toXmlString();
236            }
237    
238            public void persist()
239                    throws com.liferay.portal.kernel.exception.SystemException {
240                    _resourceCode.persist();
241            }
242    
243            /**
244             * @deprecated Renamed to {@link #getWrappedModel}
245             */
246            public ResourceCode getWrappedResourceCode() {
247                    return _resourceCode;
248            }
249    
250            public ResourceCode getWrappedModel() {
251                    return _resourceCode;
252            }
253    
254            public void resetOriginalValues() {
255                    _resourceCode.resetOriginalValues();
256            }
257    
258            private ResourceCode _resourceCode;
259    }