001
014
015 package com.liferay.portlet.social.model;
016
017 import com.liferay.portal.kernel.util.Validator;
018 import com.liferay.portal.model.ModelWrapper;
019
020 import java.util.HashMap;
021 import java.util.Map;
022
023
032 public class SocialActivityWrapper implements SocialActivity,
033 ModelWrapper<SocialActivity> {
034 public SocialActivityWrapper(SocialActivity socialActivity) {
035 _socialActivity = socialActivity;
036 }
037
038 @Override
039 public Class<?> getModelClass() {
040 return SocialActivity.class;
041 }
042
043 @Override
044 public String getModelClassName() {
045 return SocialActivity.class.getName();
046 }
047
048 @Override
049 public Map<String, Object> getModelAttributes() {
050 Map<String, Object> attributes = new HashMap<String, Object>();
051
052 attributes.put("activityId", getActivityId());
053 attributes.put("groupId", getGroupId());
054 attributes.put("companyId", getCompanyId());
055 attributes.put("userId", getUserId());
056 attributes.put("createDate", getCreateDate());
057 attributes.put("activitySetId", getActivitySetId());
058 attributes.put("mirrorActivityId", getMirrorActivityId());
059 attributes.put("classNameId", getClassNameId());
060 attributes.put("classPK", getClassPK());
061 attributes.put("parentClassNameId", getParentClassNameId());
062 attributes.put("parentClassPK", getParentClassPK());
063 attributes.put("type", getType());
064 attributes.put("extraData", getExtraData());
065 attributes.put("receiverUserId", getReceiverUserId());
066
067 return attributes;
068 }
069
070 @Override
071 public void setModelAttributes(Map<String, Object> attributes) {
072 Long activityId = (Long)attributes.get("activityId");
073
074 if (activityId != null) {
075 setActivityId(activityId);
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 Long createDate = (Long)attributes.get("createDate");
097
098 if (createDate != null) {
099 setCreateDate(createDate);
100 }
101
102 Long activitySetId = (Long)attributes.get("activitySetId");
103
104 if (activitySetId != null) {
105 setActivitySetId(activitySetId);
106 }
107
108 Long mirrorActivityId = (Long)attributes.get("mirrorActivityId");
109
110 if (mirrorActivityId != null) {
111 setMirrorActivityId(mirrorActivityId);
112 }
113
114 Long classNameId = (Long)attributes.get("classNameId");
115
116 if (classNameId != null) {
117 setClassNameId(classNameId);
118 }
119
120 Long classPK = (Long)attributes.get("classPK");
121
122 if (classPK != null) {
123 setClassPK(classPK);
124 }
125
126 Long parentClassNameId = (Long)attributes.get("parentClassNameId");
127
128 if (parentClassNameId != null) {
129 setParentClassNameId(parentClassNameId);
130 }
131
132 Long parentClassPK = (Long)attributes.get("parentClassPK");
133
134 if (parentClassPK != null) {
135 setParentClassPK(parentClassPK);
136 }
137
138 Integer type = (Integer)attributes.get("type");
139
140 if (type != null) {
141 setType(type);
142 }
143
144 String extraData = (String)attributes.get("extraData");
145
146 if (extraData != null) {
147 setExtraData(extraData);
148 }
149
150 Long receiverUserId = (Long)attributes.get("receiverUserId");
151
152 if (receiverUserId != null) {
153 setReceiverUserId(receiverUserId);
154 }
155 }
156
157
162 @Override
163 public long getPrimaryKey() {
164 return _socialActivity.getPrimaryKey();
165 }
166
167
172 @Override
173 public void setPrimaryKey(long primaryKey) {
174 _socialActivity.setPrimaryKey(primaryKey);
175 }
176
177
182 @Override
183 public long getActivityId() {
184 return _socialActivity.getActivityId();
185 }
186
187
192 @Override
193 public void setActivityId(long activityId) {
194 _socialActivity.setActivityId(activityId);
195 }
196
197
202 @Override
203 public long getGroupId() {
204 return _socialActivity.getGroupId();
205 }
206
207
212 @Override
213 public void setGroupId(long groupId) {
214 _socialActivity.setGroupId(groupId);
215 }
216
217
222 @Override
223 public long getCompanyId() {
224 return _socialActivity.getCompanyId();
225 }
226
227
232 @Override
233 public void setCompanyId(long companyId) {
234 _socialActivity.setCompanyId(companyId);
235 }
236
237
242 @Override
243 public long getUserId() {
244 return _socialActivity.getUserId();
245 }
246
247
252 @Override
253 public void setUserId(long userId) {
254 _socialActivity.setUserId(userId);
255 }
256
257
263 @Override
264 public java.lang.String getUserUuid()
265 throws com.liferay.portal.kernel.exception.SystemException {
266 return _socialActivity.getUserUuid();
267 }
268
269
274 @Override
275 public void setUserUuid(java.lang.String userUuid) {
276 _socialActivity.setUserUuid(userUuid);
277 }
278
279
284 @Override
285 public long getCreateDate() {
286 return _socialActivity.getCreateDate();
287 }
288
289
294 @Override
295 public void setCreateDate(long createDate) {
296 _socialActivity.setCreateDate(createDate);
297 }
298
299
304 @Override
305 public long getActivitySetId() {
306 return _socialActivity.getActivitySetId();
307 }
308
309
314 @Override
315 public void setActivitySetId(long activitySetId) {
316 _socialActivity.setActivitySetId(activitySetId);
317 }
318
319
324 @Override
325 public long getMirrorActivityId() {
326 return _socialActivity.getMirrorActivityId();
327 }
328
329
334 @Override
335 public void setMirrorActivityId(long mirrorActivityId) {
336 _socialActivity.setMirrorActivityId(mirrorActivityId);
337 }
338
339
344 @Override
345 public java.lang.String getClassName() {
346 return _socialActivity.getClassName();
347 }
348
349 @Override
350 public void setClassName(java.lang.String className) {
351 _socialActivity.setClassName(className);
352 }
353
354
359 @Override
360 public long getClassNameId() {
361 return _socialActivity.getClassNameId();
362 }
363
364
369 @Override
370 public void setClassNameId(long classNameId) {
371 _socialActivity.setClassNameId(classNameId);
372 }
373
374
379 @Override
380 public long getClassPK() {
381 return _socialActivity.getClassPK();
382 }
383
384
389 @Override
390 public void setClassPK(long classPK) {
391 _socialActivity.setClassPK(classPK);
392 }
393
394
399 @Override
400 public long getParentClassNameId() {
401 return _socialActivity.getParentClassNameId();
402 }
403
404
409 @Override
410 public void setParentClassNameId(long parentClassNameId) {
411 _socialActivity.setParentClassNameId(parentClassNameId);
412 }
413
414
419 @Override
420 public long getParentClassPK() {
421 return _socialActivity.getParentClassPK();
422 }
423
424
429 @Override
430 public void setParentClassPK(long parentClassPK) {
431 _socialActivity.setParentClassPK(parentClassPK);
432 }
433
434
439 @Override
440 public int getType() {
441 return _socialActivity.getType();
442 }
443
444
449 @Override
450 public void setType(int type) {
451 _socialActivity.setType(type);
452 }
453
454
459 @Override
460 public java.lang.String getExtraData() {
461 return _socialActivity.getExtraData();
462 }
463
464
469 @Override
470 public void setExtraData(java.lang.String extraData) {
471 _socialActivity.setExtraData(extraData);
472 }
473
474
479 @Override
480 public long getReceiverUserId() {
481 return _socialActivity.getReceiverUserId();
482 }
483
484
489 @Override
490 public void setReceiverUserId(long receiverUserId) {
491 _socialActivity.setReceiverUserId(receiverUserId);
492 }
493
494
500 @Override
501 public java.lang.String getReceiverUserUuid()
502 throws com.liferay.portal.kernel.exception.SystemException {
503 return _socialActivity.getReceiverUserUuid();
504 }
505
506
511 @Override
512 public void setReceiverUserUuid(java.lang.String receiverUserUuid) {
513 _socialActivity.setReceiverUserUuid(receiverUserUuid);
514 }
515
516 @Override
517 public boolean isNew() {
518 return _socialActivity.isNew();
519 }
520
521 @Override
522 public void setNew(boolean n) {
523 _socialActivity.setNew(n);
524 }
525
526 @Override
527 public boolean isCachedModel() {
528 return _socialActivity.isCachedModel();
529 }
530
531 @Override
532 public void setCachedModel(boolean cachedModel) {
533 _socialActivity.setCachedModel(cachedModel);
534 }
535
536 @Override
537 public boolean isEscapedModel() {
538 return _socialActivity.isEscapedModel();
539 }
540
541 @Override
542 public java.io.Serializable getPrimaryKeyObj() {
543 return _socialActivity.getPrimaryKeyObj();
544 }
545
546 @Override
547 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
548 _socialActivity.setPrimaryKeyObj(primaryKeyObj);
549 }
550
551 @Override
552 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
553 return _socialActivity.getExpandoBridge();
554 }
555
556 @Override
557 public void setExpandoBridgeAttributes(
558 com.liferay.portal.model.BaseModel<?> baseModel) {
559 _socialActivity.setExpandoBridgeAttributes(baseModel);
560 }
561
562 @Override
563 public void setExpandoBridgeAttributes(
564 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
565 _socialActivity.setExpandoBridgeAttributes(expandoBridge);
566 }
567
568 @Override
569 public void setExpandoBridgeAttributes(
570 com.liferay.portal.service.ServiceContext serviceContext) {
571 _socialActivity.setExpandoBridgeAttributes(serviceContext);
572 }
573
574 @Override
575 public java.lang.Object clone() {
576 return new SocialActivityWrapper((SocialActivity)_socialActivity.clone());
577 }
578
579 @Override
580 public int compareTo(
581 com.liferay.portlet.social.model.SocialActivity socialActivity) {
582 return _socialActivity.compareTo(socialActivity);
583 }
584
585 @Override
586 public int hashCode() {
587 return _socialActivity.hashCode();
588 }
589
590 @Override
591 public com.liferay.portal.model.CacheModel<com.liferay.portlet.social.model.SocialActivity> toCacheModel() {
592 return _socialActivity.toCacheModel();
593 }
594
595 @Override
596 public com.liferay.portlet.social.model.SocialActivity toEscapedModel() {
597 return new SocialActivityWrapper(_socialActivity.toEscapedModel());
598 }
599
600 @Override
601 public com.liferay.portlet.social.model.SocialActivity toUnescapedModel() {
602 return new SocialActivityWrapper(_socialActivity.toUnescapedModel());
603 }
604
605 @Override
606 public java.lang.String toString() {
607 return _socialActivity.toString();
608 }
609
610 @Override
611 public java.lang.String toXmlString() {
612 return _socialActivity.toXmlString();
613 }
614
615 @Override
616 public void persist()
617 throws com.liferay.portal.kernel.exception.SystemException {
618 _socialActivity.persist();
619 }
620
621 @Override
622 public com.liferay.portlet.asset.model.AssetEntry getAssetEntry()
623 throws com.liferay.portal.kernel.exception.SystemException {
624 return _socialActivity.getAssetEntry();
625 }
626
627 @Override
628 public java.lang.String getExtraDataValue(java.lang.String key)
629 throws com.liferay.portal.kernel.json.JSONException {
630 return _socialActivity.getExtraDataValue(key);
631 }
632
633 @Override
634 public java.lang.String getExtraDataValue(java.lang.String key,
635 java.util.Locale locale)
636 throws com.liferay.portal.kernel.json.JSONException {
637 return _socialActivity.getExtraDataValue(key, locale);
638 }
639
640 @Override
641 public boolean isClassName(java.lang.String className) {
642 return _socialActivity.isClassName(className);
643 }
644
645 @Override
646 public void setAssetEntry(
647 com.liferay.portlet.asset.model.AssetEntry assetEntry) {
648 _socialActivity.setAssetEntry(assetEntry);
649 }
650
651 @Override
652 public void setExtraDataValue(java.lang.String key, java.lang.String value)
653 throws com.liferay.portal.kernel.json.JSONException {
654 _socialActivity.setExtraDataValue(key, value);
655 }
656
657 @Override
658 public boolean equals(Object obj) {
659 if (this == obj) {
660 return true;
661 }
662
663 if (!(obj instanceof SocialActivityWrapper)) {
664 return false;
665 }
666
667 SocialActivityWrapper socialActivityWrapper = (SocialActivityWrapper)obj;
668
669 if (Validator.equals(_socialActivity,
670 socialActivityWrapper._socialActivity)) {
671 return true;
672 }
673
674 return false;
675 }
676
677
680 public SocialActivity getWrappedSocialActivity() {
681 return _socialActivity;
682 }
683
684 @Override
685 public SocialActivity getWrappedModel() {
686 return _socialActivity;
687 }
688
689 @Override
690 public void resetOriginalValues() {
691 _socialActivity.resetOriginalValues();
692 }
693
694 private SocialActivity _socialActivity;
695 }