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.Date;
023 import java.util.HashMap;
024 import java.util.Map;
025
026
035 @ProviderType
036 public class TrashEntryWrapper implements TrashEntry, ModelWrapper<TrashEntry> {
037 public TrashEntryWrapper(TrashEntry trashEntry) {
038 _trashEntry = trashEntry;
039 }
040
041 @Override
042 public Class<?> getModelClass() {
043 return TrashEntry.class;
044 }
045
046 @Override
047 public String getModelClassName() {
048 return TrashEntry.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("entryId", getEntryId());
056 attributes.put("groupId", getGroupId());
057 attributes.put("companyId", getCompanyId());
058 attributes.put("userId", getUserId());
059 attributes.put("userName", getUserName());
060 attributes.put("createDate", getCreateDate());
061 attributes.put("classNameId", getClassNameId());
062 attributes.put("classPK", getClassPK());
063 attributes.put("systemEventSetKey", getSystemEventSetKey());
064 attributes.put("typeSettings", getTypeSettings());
065 attributes.put("status", getStatus());
066
067 return attributes;
068 }
069
070 @Override
071 public void setModelAttributes(Map<String, Object> attributes) {
072 Long entryId = (Long)attributes.get("entryId");
073
074 if (entryId != null) {
075 setEntryId(entryId);
076 }
077
078 Long groupId = (Long)attributes.get("groupId");
079
080 if (groupId != null) {
081 setGroupId(groupId);
082 }
083
084 Long companyId = (Long)attributes.get("companyId");
085
086 if (companyId != null) {
087 setCompanyId(companyId);
088 }
089
090 Long userId = (Long)attributes.get("userId");
091
092 if (userId != null) {
093 setUserId(userId);
094 }
095
096 String userName = (String)attributes.get("userName");
097
098 if (userName != null) {
099 setUserName(userName);
100 }
101
102 Date createDate = (Date)attributes.get("createDate");
103
104 if (createDate != null) {
105 setCreateDate(createDate);
106 }
107
108 Long classNameId = (Long)attributes.get("classNameId");
109
110 if (classNameId != null) {
111 setClassNameId(classNameId);
112 }
113
114 Long classPK = (Long)attributes.get("classPK");
115
116 if (classPK != null) {
117 setClassPK(classPK);
118 }
119
120 Long systemEventSetKey = (Long)attributes.get("systemEventSetKey");
121
122 if (systemEventSetKey != null) {
123 setSystemEventSetKey(systemEventSetKey);
124 }
125
126 String typeSettings = (String)attributes.get("typeSettings");
127
128 if (typeSettings != null) {
129 setTypeSettings(typeSettings);
130 }
131
132 Integer status = (Integer)attributes.get("status");
133
134 if (status != null) {
135 setStatus(status);
136 }
137 }
138
139
144 @Override
145 public long getPrimaryKey() {
146 return _trashEntry.getPrimaryKey();
147 }
148
149
154 @Override
155 public void setPrimaryKey(long primaryKey) {
156 _trashEntry.setPrimaryKey(primaryKey);
157 }
158
159
164 @Override
165 public long getEntryId() {
166 return _trashEntry.getEntryId();
167 }
168
169
174 @Override
175 public void setEntryId(long entryId) {
176 _trashEntry.setEntryId(entryId);
177 }
178
179
184 @Override
185 public long getGroupId() {
186 return _trashEntry.getGroupId();
187 }
188
189
194 @Override
195 public void setGroupId(long groupId) {
196 _trashEntry.setGroupId(groupId);
197 }
198
199
204 @Override
205 public long getCompanyId() {
206 return _trashEntry.getCompanyId();
207 }
208
209
214 @Override
215 public void setCompanyId(long companyId) {
216 _trashEntry.setCompanyId(companyId);
217 }
218
219
224 @Override
225 public long getUserId() {
226 return _trashEntry.getUserId();
227 }
228
229
234 @Override
235 public void setUserId(long userId) {
236 _trashEntry.setUserId(userId);
237 }
238
239
245 @Override
246 public java.lang.String getUserUuid()
247 throws com.liferay.portal.kernel.exception.SystemException {
248 return _trashEntry.getUserUuid();
249 }
250
251
256 @Override
257 public void setUserUuid(java.lang.String userUuid) {
258 _trashEntry.setUserUuid(userUuid);
259 }
260
261
266 @Override
267 public java.lang.String getUserName() {
268 return _trashEntry.getUserName();
269 }
270
271
276 @Override
277 public void setUserName(java.lang.String userName) {
278 _trashEntry.setUserName(userName);
279 }
280
281
286 @Override
287 public java.util.Date getCreateDate() {
288 return _trashEntry.getCreateDate();
289 }
290
291
296 @Override
297 public void setCreateDate(java.util.Date createDate) {
298 _trashEntry.setCreateDate(createDate);
299 }
300
301
306 @Override
307 public java.lang.String getClassName() {
308 return _trashEntry.getClassName();
309 }
310
311 @Override
312 public void setClassName(java.lang.String className) {
313 _trashEntry.setClassName(className);
314 }
315
316
321 @Override
322 public long getClassNameId() {
323 return _trashEntry.getClassNameId();
324 }
325
326
331 @Override
332 public void setClassNameId(long classNameId) {
333 _trashEntry.setClassNameId(classNameId);
334 }
335
336
341 @Override
342 public long getClassPK() {
343 return _trashEntry.getClassPK();
344 }
345
346
351 @Override
352 public void setClassPK(long classPK) {
353 _trashEntry.setClassPK(classPK);
354 }
355
356
361 @Override
362 public long getSystemEventSetKey() {
363 return _trashEntry.getSystemEventSetKey();
364 }
365
366
371 @Override
372 public void setSystemEventSetKey(long systemEventSetKey) {
373 _trashEntry.setSystemEventSetKey(systemEventSetKey);
374 }
375
376
381 @Override
382 public java.lang.String getTypeSettings() {
383 return _trashEntry.getTypeSettings();
384 }
385
386
391 @Override
392 public void setTypeSettings(java.lang.String typeSettings) {
393 _trashEntry.setTypeSettings(typeSettings);
394 }
395
396
401 @Override
402 public int getStatus() {
403 return _trashEntry.getStatus();
404 }
405
406
411 @Override
412 public void setStatus(int status) {
413 _trashEntry.setStatus(status);
414 }
415
416 @Override
417 public boolean isNew() {
418 return _trashEntry.isNew();
419 }
420
421 @Override
422 public void setNew(boolean n) {
423 _trashEntry.setNew(n);
424 }
425
426 @Override
427 public boolean isCachedModel() {
428 return _trashEntry.isCachedModel();
429 }
430
431 @Override
432 public void setCachedModel(boolean cachedModel) {
433 _trashEntry.setCachedModel(cachedModel);
434 }
435
436 @Override
437 public boolean isEscapedModel() {
438 return _trashEntry.isEscapedModel();
439 }
440
441 @Override
442 public java.io.Serializable getPrimaryKeyObj() {
443 return _trashEntry.getPrimaryKeyObj();
444 }
445
446 @Override
447 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
448 _trashEntry.setPrimaryKeyObj(primaryKeyObj);
449 }
450
451 @Override
452 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
453 return _trashEntry.getExpandoBridge();
454 }
455
456 @Override
457 public void setExpandoBridgeAttributes(
458 com.liferay.portal.model.BaseModel<?> baseModel) {
459 _trashEntry.setExpandoBridgeAttributes(baseModel);
460 }
461
462 @Override
463 public void setExpandoBridgeAttributes(
464 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
465 _trashEntry.setExpandoBridgeAttributes(expandoBridge);
466 }
467
468 @Override
469 public void setExpandoBridgeAttributes(
470 com.liferay.portal.service.ServiceContext serviceContext) {
471 _trashEntry.setExpandoBridgeAttributes(serviceContext);
472 }
473
474 @Override
475 public java.lang.Object clone() {
476 return new TrashEntryWrapper((TrashEntry)_trashEntry.clone());
477 }
478
479 @Override
480 public int compareTo(com.liferay.portlet.trash.model.TrashEntry trashEntry) {
481 return _trashEntry.compareTo(trashEntry);
482 }
483
484 @Override
485 public int hashCode() {
486 return _trashEntry.hashCode();
487 }
488
489 @Override
490 public com.liferay.portal.model.CacheModel<com.liferay.portlet.trash.model.TrashEntry> toCacheModel() {
491 return _trashEntry.toCacheModel();
492 }
493
494 @Override
495 public com.liferay.portlet.trash.model.TrashEntry toEscapedModel() {
496 return new TrashEntryWrapper(_trashEntry.toEscapedModel());
497 }
498
499 @Override
500 public com.liferay.portlet.trash.model.TrashEntry toUnescapedModel() {
501 return new TrashEntryWrapper(_trashEntry.toUnescapedModel());
502 }
503
504 @Override
505 public java.lang.String toString() {
506 return _trashEntry.toString();
507 }
508
509 @Override
510 public java.lang.String toXmlString() {
511 return _trashEntry.toXmlString();
512 }
513
514 @Override
515 public void persist()
516 throws com.liferay.portal.kernel.exception.SystemException {
517 _trashEntry.persist();
518 }
519
520 @Override
521 public com.liferay.portlet.trash.model.TrashEntry getRootEntry() {
522 return _trashEntry.getRootEntry();
523 }
524
525 @Override
526 public com.liferay.portal.kernel.util.UnicodeProperties getTypeSettingsProperties() {
527 return _trashEntry.getTypeSettingsProperties();
528 }
529
530 @Override
531 public java.lang.String getTypeSettingsProperty(java.lang.String key) {
532 return _trashEntry.getTypeSettingsProperty(key);
533 }
534
535 @Override
536 public java.lang.String getTypeSettingsProperty(java.lang.String key,
537 java.lang.String defaultValue) {
538 return _trashEntry.getTypeSettingsProperty(key, defaultValue);
539 }
540
541 @Override
542 public boolean isTrashEntry(java.lang.Class<?> clazz, long classPK) {
543 return _trashEntry.isTrashEntry(clazz, classPK);
544 }
545
546 @Override
547 public boolean isTrashEntry(java.lang.String className, long classPK) {
548 return _trashEntry.isTrashEntry(className, classPK);
549 }
550
551 @Override
552 public boolean isTrashEntry(
553 com.liferay.portal.model.TrashedModel trashedModel) {
554 return _trashEntry.isTrashEntry(trashedModel);
555 }
556
557 @Override
558 public void setRootEntry(
559 com.liferay.portlet.trash.model.TrashEntry rootEntry) {
560 _trashEntry.setRootEntry(rootEntry);
561 }
562
563 @Override
564 public void setTypeSettingsProperties(
565 com.liferay.portal.kernel.util.UnicodeProperties typeSettingsProperties) {
566 _trashEntry.setTypeSettingsProperties(typeSettingsProperties);
567 }
568
569 @Override
570 public boolean equals(Object obj) {
571 if (this == obj) {
572 return true;
573 }
574
575 if (!(obj instanceof TrashEntryWrapper)) {
576 return false;
577 }
578
579 TrashEntryWrapper trashEntryWrapper = (TrashEntryWrapper)obj;
580
581 if (Validator.equals(_trashEntry, trashEntryWrapper._trashEntry)) {
582 return true;
583 }
584
585 return false;
586 }
587
588
591 public TrashEntry getWrappedTrashEntry() {
592 return _trashEntry;
593 }
594
595 @Override
596 public TrashEntry getWrappedModel() {
597 return _trashEntry;
598 }
599
600 @Override
601 public void resetOriginalValues() {
602 _trashEntry.resetOriginalValues();
603 }
604
605 private TrashEntry _trashEntry;
606 }