001
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
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
094 public long getPrimaryKey() {
095 return _trashVersion.getPrimaryKey();
096 }
097
098
103 public void setPrimaryKey(long primaryKey) {
104 _trashVersion.setPrimaryKey(primaryKey);
105 }
106
107
112 public long getVersionId() {
113 return _trashVersion.getVersionId();
114 }
115
116
121 public void setVersionId(long versionId) {
122 _trashVersion.setVersionId(versionId);
123 }
124
125
130 public long getEntryId() {
131 return _trashVersion.getEntryId();
132 }
133
134
139 public void setEntryId(long entryId) {
140 _trashVersion.setEntryId(entryId);
141 }
142
143
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
161 public long getClassNameId() {
162 return _trashVersion.getClassNameId();
163 }
164
165
170 public void setClassNameId(long classNameId) {
171 _trashVersion.setClassNameId(classNameId);
172 }
173
174
179 public long getClassPK() {
180 return _trashVersion.getClassPK();
181 }
182
183
188 public void setClassPK(long classPK) {
189 _trashVersion.setClassPK(classPK);
190 }
191
192
197 public int getStatus() {
198 return _trashVersion.getStatus();
199 }
200
201
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 @Override
271 public java.lang.String toString() {
272 return _trashVersion.toString();
273 }
274
275 public java.lang.String toXmlString() {
276 return _trashVersion.toXmlString();
277 }
278
279
282 public TrashVersion getWrappedTrashVersion() {
283 return _trashVersion;
284 }
285
286 public TrashVersion getWrappedModel() {
287 return _trashVersion;
288 }
289
290 public void resetOriginalValues() {
291 _trashVersion.resetOriginalValues();
292 }
293
294 private TrashVersion _trashVersion;
295 }