001
014
015 package com.liferay.portlet.trash.model;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.util.Validator;
020 import com.liferay.portal.model.ModelWrapper;
021
022 import java.util.HashMap;
023 import java.util.Map;
024
025
034 @ProviderType
035 public class TrashVersionWrapper implements TrashVersion,
036 ModelWrapper<TrashVersion> {
037 public TrashVersionWrapper(TrashVersion trashVersion) {
038 _trashVersion = trashVersion;
039 }
040
041 @Override
042 public Class<?> getModelClass() {
043 return TrashVersion.class;
044 }
045
046 @Override
047 public String getModelClassName() {
048 return TrashVersion.class.getName();
049 }
050
051 @Override
052 public Map<String, Object> getModelAttributes() {
053 Map<String, Object> attributes = new HashMap<String, Object>();
054
055 attributes.put("versionId", getVersionId());
056 attributes.put("entryId", getEntryId());
057 attributes.put("classNameId", getClassNameId());
058 attributes.put("classPK", getClassPK());
059 attributes.put("typeSettings", getTypeSettings());
060 attributes.put("status", getStatus());
061
062 return attributes;
063 }
064
065 @Override
066 public void setModelAttributes(Map<String, Object> attributes) {
067 Long versionId = (Long)attributes.get("versionId");
068
069 if (versionId != null) {
070 setVersionId(versionId);
071 }
072
073 Long entryId = (Long)attributes.get("entryId");
074
075 if (entryId != null) {
076 setEntryId(entryId);
077 }
078
079 Long classNameId = (Long)attributes.get("classNameId");
080
081 if (classNameId != null) {
082 setClassNameId(classNameId);
083 }
084
085 Long classPK = (Long)attributes.get("classPK");
086
087 if (classPK != null) {
088 setClassPK(classPK);
089 }
090
091 String typeSettings = (String)attributes.get("typeSettings");
092
093 if (typeSettings != null) {
094 setTypeSettings(typeSettings);
095 }
096
097 Integer status = (Integer)attributes.get("status");
098
099 if (status != null) {
100 setStatus(status);
101 }
102 }
103
104 @Override
105 public java.lang.Object clone() {
106 return new TrashVersionWrapper((TrashVersion)_trashVersion.clone());
107 }
108
109 @Override
110 public int compareTo(
111 com.liferay.portlet.trash.model.TrashVersion trashVersion) {
112 return _trashVersion.compareTo(trashVersion);
113 }
114
115
120 @Override
121 public java.lang.String getClassName() {
122 return _trashVersion.getClassName();
123 }
124
125
130 @Override
131 public long getClassNameId() {
132 return _trashVersion.getClassNameId();
133 }
134
135
140 @Override
141 public long getClassPK() {
142 return _trashVersion.getClassPK();
143 }
144
145
150 @Override
151 public long getEntryId() {
152 return _trashVersion.getEntryId();
153 }
154
155 @Override
156 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
157 return _trashVersion.getExpandoBridge();
158 }
159
160
165 @Override
166 public long getPrimaryKey() {
167 return _trashVersion.getPrimaryKey();
168 }
169
170 @Override
171 public java.io.Serializable getPrimaryKeyObj() {
172 return _trashVersion.getPrimaryKeyObj();
173 }
174
175
180 @Override
181 public int getStatus() {
182 return _trashVersion.getStatus();
183 }
184
185
190 @Override
191 public java.lang.String getTypeSettings() {
192 return _trashVersion.getTypeSettings();
193 }
194
195 @Override
196 public com.liferay.portal.kernel.util.UnicodeProperties getTypeSettingsProperties() {
197 return _trashVersion.getTypeSettingsProperties();
198 }
199
200 @Override
201 public java.lang.String getTypeSettingsProperty(java.lang.String key) {
202 return _trashVersion.getTypeSettingsProperty(key);
203 }
204
205 @Override
206 public java.lang.String getTypeSettingsProperty(java.lang.String key,
207 java.lang.String defaultValue) {
208 return _trashVersion.getTypeSettingsProperty(key, defaultValue);
209 }
210
211
216 @Override
217 public long getVersionId() {
218 return _trashVersion.getVersionId();
219 }
220
221 @Override
222 public int hashCode() {
223 return _trashVersion.hashCode();
224 }
225
226 @Override
227 public boolean isCachedModel() {
228 return _trashVersion.isCachedModel();
229 }
230
231 @Override
232 public boolean isEscapedModel() {
233 return _trashVersion.isEscapedModel();
234 }
235
236 @Override
237 public boolean isNew() {
238 return _trashVersion.isNew();
239 }
240
241 @Override
242 public void persist() {
243 _trashVersion.persist();
244 }
245
246 @Override
247 public void setCachedModel(boolean cachedModel) {
248 _trashVersion.setCachedModel(cachedModel);
249 }
250
251 @Override
252 public void setClassName(java.lang.String className) {
253 _trashVersion.setClassName(className);
254 }
255
256
261 @Override
262 public void setClassNameId(long classNameId) {
263 _trashVersion.setClassNameId(classNameId);
264 }
265
266
271 @Override
272 public void setClassPK(long classPK) {
273 _trashVersion.setClassPK(classPK);
274 }
275
276
281 @Override
282 public void setEntryId(long entryId) {
283 _trashVersion.setEntryId(entryId);
284 }
285
286 @Override
287 public void setExpandoBridgeAttributes(
288 com.liferay.portal.model.BaseModel<?> baseModel) {
289 _trashVersion.setExpandoBridgeAttributes(baseModel);
290 }
291
292 @Override
293 public void setExpandoBridgeAttributes(
294 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
295 _trashVersion.setExpandoBridgeAttributes(expandoBridge);
296 }
297
298 @Override
299 public void setExpandoBridgeAttributes(
300 com.liferay.portal.service.ServiceContext serviceContext) {
301 _trashVersion.setExpandoBridgeAttributes(serviceContext);
302 }
303
304 @Override
305 public void setNew(boolean n) {
306 _trashVersion.setNew(n);
307 }
308
309
314 @Override
315 public void setPrimaryKey(long primaryKey) {
316 _trashVersion.setPrimaryKey(primaryKey);
317 }
318
319 @Override
320 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
321 _trashVersion.setPrimaryKeyObj(primaryKeyObj);
322 }
323
324
329 @Override
330 public void setStatus(int status) {
331 _trashVersion.setStatus(status);
332 }
333
334
339 @Override
340 public void setTypeSettings(java.lang.String typeSettings) {
341 _trashVersion.setTypeSettings(typeSettings);
342 }
343
344 @Override
345 public void setTypeSettingsProperties(
346 com.liferay.portal.kernel.util.UnicodeProperties typeSettingsProperties) {
347 _trashVersion.setTypeSettingsProperties(typeSettingsProperties);
348 }
349
350
355 @Override
356 public void setVersionId(long versionId) {
357 _trashVersion.setVersionId(versionId);
358 }
359
360 @Override
361 public com.liferay.portal.model.CacheModel<com.liferay.portlet.trash.model.TrashVersion> toCacheModel() {
362 return _trashVersion.toCacheModel();
363 }
364
365 @Override
366 public com.liferay.portlet.trash.model.TrashVersion toEscapedModel() {
367 return new TrashVersionWrapper(_trashVersion.toEscapedModel());
368 }
369
370 @Override
371 public java.lang.String toString() {
372 return _trashVersion.toString();
373 }
374
375 @Override
376 public com.liferay.portlet.trash.model.TrashVersion toUnescapedModel() {
377 return new TrashVersionWrapper(_trashVersion.toUnescapedModel());
378 }
379
380 @Override
381 public java.lang.String toXmlString() {
382 return _trashVersion.toXmlString();
383 }
384
385 @Override
386 public boolean equals(Object obj) {
387 if (this == obj) {
388 return true;
389 }
390
391 if (!(obj instanceof TrashVersionWrapper)) {
392 return false;
393 }
394
395 TrashVersionWrapper trashVersionWrapper = (TrashVersionWrapper)obj;
396
397 if (Validator.equals(_trashVersion, trashVersionWrapper._trashVersion)) {
398 return true;
399 }
400
401 return false;
402 }
403
404
407 @Deprecated
408 public TrashVersion getWrappedTrashVersion() {
409 return _trashVersion;
410 }
411
412 @Override
413 public TrashVersion getWrappedModel() {
414 return _trashVersion;
415 }
416
417 @Override
418 public boolean isEntityCacheEnabled() {
419 return _trashVersion.isEntityCacheEnabled();
420 }
421
422 @Override
423 public boolean isFinderCacheEnabled() {
424 return _trashVersion.isFinderCacheEnabled();
425 }
426
427 @Override
428 public void resetOriginalValues() {
429 _trashVersion.resetOriginalValues();
430 }
431
432 private final TrashVersion _trashVersion;
433 }