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.portlet.trash.model;
016    
017    import com.liferay.portal.model.ModelWrapper;
018    
019    import java.util.HashMap;
020    import java.util.Map;
021    
022    /**
023     * <p>
024     * This class is a wrapper for {@link TrashVersion}.
025     * </p>
026     *
027     * @author    Brian Wing Shun Chan
028     * @see       TrashVersion
029     * @generated
030     */
031    public class TrashVersionWrapper implements TrashVersion,
032            ModelWrapper<TrashVersion> {
033            public TrashVersionWrapper(TrashVersion trashVersion) {
034                    _trashVersion = trashVersion;
035            }
036    
037            public Class<?> getModelClass() {
038                    return TrashVersion.class;
039            }
040    
041            public String getModelClassName() {
042                    return TrashVersion.class.getName();
043            }
044    
045            public Map<String, Object> getModelAttributes() {
046                    Map<String, Object> attributes = new HashMap<String, Object>();
047    
048                    attributes.put("versionId", getVersionId());
049                    attributes.put("entryId", getEntryId());
050                    attributes.put("classNameId", getClassNameId());
051                    attributes.put("classPK", getClassPK());
052                    attributes.put("status", getStatus());
053    
054                    return attributes;
055            }
056    
057            public void setModelAttributes(Map<String, Object> attributes) {
058                    Long versionId = (Long)attributes.get("versionId");
059    
060                    if (versionId != null) {
061                            setVersionId(versionId);
062                    }
063    
064                    Long entryId = (Long)attributes.get("entryId");
065    
066                    if (entryId != null) {
067                            setEntryId(entryId);
068                    }
069    
070                    Long classNameId = (Long)attributes.get("classNameId");
071    
072                    if (classNameId != null) {
073                            setClassNameId(classNameId);
074                    }
075    
076                    Long classPK = (Long)attributes.get("classPK");
077    
078                    if (classPK != null) {
079                            setClassPK(classPK);
080                    }
081    
082                    Integer status = (Integer)attributes.get("status");
083    
084                    if (status != null) {
085                            setStatus(status);
086                    }
087            }
088    
089            /**
090            * Returns the primary key of this trash version.
091            *
092            * @return the primary key of this trash version
093            */
094            public long getPrimaryKey() {
095                    return _trashVersion.getPrimaryKey();
096            }
097    
098            /**
099            * Sets the primary key of this trash version.
100            *
101            * @param primaryKey the primary key of this trash version
102            */
103            public void setPrimaryKey(long primaryKey) {
104                    _trashVersion.setPrimaryKey(primaryKey);
105            }
106    
107            /**
108            * Returns the version ID of this trash version.
109            *
110            * @return the version ID of this trash version
111            */
112            public long getVersionId() {
113                    return _trashVersion.getVersionId();
114            }
115    
116            /**
117            * Sets the version ID of this trash version.
118            *
119            * @param versionId the version ID of this trash version
120            */
121            public void setVersionId(long versionId) {
122                    _trashVersion.setVersionId(versionId);
123            }
124    
125            /**
126            * Returns the entry ID of this trash version.
127            *
128            * @return the entry ID of this trash version
129            */
130            public long getEntryId() {
131                    return _trashVersion.getEntryId();
132            }
133    
134            /**
135            * Sets the entry ID of this trash version.
136            *
137            * @param entryId the entry ID of this trash version
138            */
139            public void setEntryId(long entryId) {
140                    _trashVersion.setEntryId(entryId);
141            }
142    
143            /**
144            * Returns the fully qualified class name of this trash version.
145            *
146            * @return the fully qualified class name of this trash version
147            */
148            public java.lang.String getClassName() {
149                    return _trashVersion.getClassName();
150            }
151    
152            public void setClassName(java.lang.String className) {
153                    _trashVersion.setClassName(className);
154            }
155    
156            /**
157            * Returns the class name ID of this trash version.
158            *
159            * @return the class name ID of this trash version
160            */
161            public long getClassNameId() {
162                    return _trashVersion.getClassNameId();
163            }
164    
165            /**
166            * Sets the class name ID of this trash version.
167            *
168            * @param classNameId the class name ID of this trash version
169            */
170            public void setClassNameId(long classNameId) {
171                    _trashVersion.setClassNameId(classNameId);
172            }
173    
174            /**
175            * Returns the class p k of this trash version.
176            *
177            * @return the class p k of this trash version
178            */
179            public long getClassPK() {
180                    return _trashVersion.getClassPK();
181            }
182    
183            /**
184            * Sets the class p k of this trash version.
185            *
186            * @param classPK the class p k of this trash version
187            */
188            public void setClassPK(long classPK) {
189                    _trashVersion.setClassPK(classPK);
190            }
191    
192            /**
193            * Returns the status of this trash version.
194            *
195            * @return the status of this trash version
196            */
197            public int getStatus() {
198                    return _trashVersion.getStatus();
199            }
200    
201            /**
202            * Sets the status of this trash version.
203            *
204            * @param status the status of this trash version
205            */
206            public void setStatus(int status) {
207                    _trashVersion.setStatus(status);
208            }
209    
210            public boolean isNew() {
211                    return _trashVersion.isNew();
212            }
213    
214            public void setNew(boolean n) {
215                    _trashVersion.setNew(n);
216            }
217    
218            public boolean isCachedModel() {
219                    return _trashVersion.isCachedModel();
220            }
221    
222            public void setCachedModel(boolean cachedModel) {
223                    _trashVersion.setCachedModel(cachedModel);
224            }
225    
226            public boolean isEscapedModel() {
227                    return _trashVersion.isEscapedModel();
228            }
229    
230            public java.io.Serializable getPrimaryKeyObj() {
231                    return _trashVersion.getPrimaryKeyObj();
232            }
233    
234            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
235                    _trashVersion.setPrimaryKeyObj(primaryKeyObj);
236            }
237    
238            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
239                    return _trashVersion.getExpandoBridge();
240            }
241    
242            public void setExpandoBridgeAttributes(
243                    com.liferay.portal.service.ServiceContext serviceContext) {
244                    _trashVersion.setExpandoBridgeAttributes(serviceContext);
245            }
246    
247            @Override
248            public java.lang.Object clone() {
249                    return new TrashVersionWrapper((TrashVersion)_trashVersion.clone());
250            }
251    
252            public int compareTo(
253                    com.liferay.portlet.trash.model.TrashVersion trashVersion) {
254                    return _trashVersion.compareTo(trashVersion);
255            }
256    
257            @Override
258            public int hashCode() {
259                    return _trashVersion.hashCode();
260            }
261    
262            public com.liferay.portal.model.CacheModel<com.liferay.portlet.trash.model.TrashVersion> toCacheModel() {
263                    return _trashVersion.toCacheModel();
264            }
265    
266            public com.liferay.portlet.trash.model.TrashVersion toEscapedModel() {
267                    return new TrashVersionWrapper(_trashVersion.toEscapedModel());
268            }
269    
270            public com.liferay.portlet.trash.model.TrashVersion toUnescapedModel() {
271                    return new TrashVersionWrapper(_trashVersion.toUnescapedModel());
272            }
273    
274            @Override
275            public java.lang.String toString() {
276                    return _trashVersion.toString();
277            }
278    
279            public java.lang.String toXmlString() {
280                    return _trashVersion.toXmlString();
281            }
282    
283            /**
284             * @deprecated Renamed to {@link #getWrappedModel}
285             */
286            public TrashVersion getWrappedTrashVersion() {
287                    return _trashVersion;
288            }
289    
290            public TrashVersion getWrappedModel() {
291                    return _trashVersion;
292            }
293    
294            public void resetOriginalValues() {
295                    _trashVersion.resetOriginalValues();
296            }
297    
298            private TrashVersion _trashVersion;
299    }