001
014
015 package com.liferay.portlet.social.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 import com.liferay.portal.service.ServiceContext;
022
023 import com.liferay.portlet.expando.model.ExpandoBridge;
024
025 import java.io.Serializable;
026
027 import java.util.HashMap;
028 import java.util.Map;
029
030
039 @ProviderType
040 public class SocialActivityWrapper implements SocialActivity,
041 ModelWrapper<SocialActivity> {
042 public SocialActivityWrapper(SocialActivity socialActivity) {
043 _socialActivity = socialActivity;
044 }
045
046 @Override
047 public Class<?> getModelClass() {
048 return SocialActivity.class;
049 }
050
051 @Override
052 public String getModelClassName() {
053 return SocialActivity.class.getName();
054 }
055
056 @Override
057 public Map<String, Object> getModelAttributes() {
058 Map<String, Object> attributes = new HashMap<String, Object>();
059
060 attributes.put("activityId", getActivityId());
061 attributes.put("groupId", getGroupId());
062 attributes.put("companyId", getCompanyId());
063 attributes.put("userId", getUserId());
064 attributes.put("createDate", getCreateDate());
065 attributes.put("activitySetId", getActivitySetId());
066 attributes.put("mirrorActivityId", getMirrorActivityId());
067 attributes.put("classNameId", getClassNameId());
068 attributes.put("classPK", getClassPK());
069 attributes.put("parentClassNameId", getParentClassNameId());
070 attributes.put("parentClassPK", getParentClassPK());
071 attributes.put("type", getType());
072 attributes.put("extraData", getExtraData());
073 attributes.put("receiverUserId", getReceiverUserId());
074
075 return attributes;
076 }
077
078 @Override
079 public void setModelAttributes(Map<String, Object> attributes) {
080 Long activityId = (Long)attributes.get("activityId");
081
082 if (activityId != null) {
083 setActivityId(activityId);
084 }
085
086 Long groupId = (Long)attributes.get("groupId");
087
088 if (groupId != null) {
089 setGroupId(groupId);
090 }
091
092 Long companyId = (Long)attributes.get("companyId");
093
094 if (companyId != null) {
095 setCompanyId(companyId);
096 }
097
098 Long userId = (Long)attributes.get("userId");
099
100 if (userId != null) {
101 setUserId(userId);
102 }
103
104 Long createDate = (Long)attributes.get("createDate");
105
106 if (createDate != null) {
107 setCreateDate(createDate);
108 }
109
110 Long activitySetId = (Long)attributes.get("activitySetId");
111
112 if (activitySetId != null) {
113 setActivitySetId(activitySetId);
114 }
115
116 Long mirrorActivityId = (Long)attributes.get("mirrorActivityId");
117
118 if (mirrorActivityId != null) {
119 setMirrorActivityId(mirrorActivityId);
120 }
121
122 Long classNameId = (Long)attributes.get("classNameId");
123
124 if (classNameId != null) {
125 setClassNameId(classNameId);
126 }
127
128 Long classPK = (Long)attributes.get("classPK");
129
130 if (classPK != null) {
131 setClassPK(classPK);
132 }
133
134 Long parentClassNameId = (Long)attributes.get("parentClassNameId");
135
136 if (parentClassNameId != null) {
137 setParentClassNameId(parentClassNameId);
138 }
139
140 Long parentClassPK = (Long)attributes.get("parentClassPK");
141
142 if (parentClassPK != null) {
143 setParentClassPK(parentClassPK);
144 }
145
146 Integer type = (Integer)attributes.get("type");
147
148 if (type != null) {
149 setType(type);
150 }
151
152 String extraData = (String)attributes.get("extraData");
153
154 if (extraData != null) {
155 setExtraData(extraData);
156 }
157
158 Long receiverUserId = (Long)attributes.get("receiverUserId");
159
160 if (receiverUserId != null) {
161 setReceiverUserId(receiverUserId);
162 }
163 }
164
165 @Override
166 public java.lang.Object clone() {
167 return new SocialActivityWrapper((SocialActivity)_socialActivity.clone());
168 }
169
170 @Override
171 public int compareTo(
172 com.liferay.portlet.social.model.SocialActivity socialActivity) {
173 return _socialActivity.compareTo(socialActivity);
174 }
175
176
181 @Override
182 public long getActivityId() {
183 return _socialActivity.getActivityId();
184 }
185
186
191 @Override
192 public long getActivitySetId() {
193 return _socialActivity.getActivitySetId();
194 }
195
196 @Override
197 public com.liferay.portlet.asset.model.AssetEntry getAssetEntry() {
198 return _socialActivity.getAssetEntry();
199 }
200
201
206 @Override
207 public java.lang.String getClassName() {
208 return _socialActivity.getClassName();
209 }
210
211
216 @Override
217 public long getClassNameId() {
218 return _socialActivity.getClassNameId();
219 }
220
221
226 @Override
227 public long getClassPK() {
228 return _socialActivity.getClassPK();
229 }
230
231
236 @Override
237 public long getCompanyId() {
238 return _socialActivity.getCompanyId();
239 }
240
241
246 @Override
247 public long getCreateDate() {
248 return _socialActivity.getCreateDate();
249 }
250
251 @Override
252 public ExpandoBridge getExpandoBridge() {
253 return _socialActivity.getExpandoBridge();
254 }
255
256
261 @Override
262 public java.lang.String getExtraData() {
263 return _socialActivity.getExtraData();
264 }
265
266 @Override
267 public java.lang.String getExtraDataValue(java.lang.String key)
268 throws com.liferay.portal.kernel.json.JSONException {
269 return _socialActivity.getExtraDataValue(key);
270 }
271
272 @Override
273 public java.lang.String getExtraDataValue(java.lang.String key,
274 java.util.Locale locale)
275 throws com.liferay.portal.kernel.json.JSONException {
276 return _socialActivity.getExtraDataValue(key, locale);
277 }
278
279
284 @Override
285 public long getGroupId() {
286 return _socialActivity.getGroupId();
287 }
288
289
294 @Override
295 public long getMirrorActivityId() {
296 return _socialActivity.getMirrorActivityId();
297 }
298
299
304 @Override
305 public long getParentClassNameId() {
306 return _socialActivity.getParentClassNameId();
307 }
308
309
314 @Override
315 public long getParentClassPK() {
316 return _socialActivity.getParentClassPK();
317 }
318
319
324 @Override
325 public long getPrimaryKey() {
326 return _socialActivity.getPrimaryKey();
327 }
328
329 @Override
330 public Serializable getPrimaryKeyObj() {
331 return _socialActivity.getPrimaryKeyObj();
332 }
333
334
339 @Override
340 public long getReceiverUserId() {
341 return _socialActivity.getReceiverUserId();
342 }
343
344
349 @Override
350 public java.lang.String getReceiverUserUuid() {
351 return _socialActivity.getReceiverUserUuid();
352 }
353
354
359 @Override
360 public int getType() {
361 return _socialActivity.getType();
362 }
363
364
369 @Override
370 public long getUserId() {
371 return _socialActivity.getUserId();
372 }
373
374
379 @Override
380 public java.lang.String getUserUuid() {
381 return _socialActivity.getUserUuid();
382 }
383
384 @Override
385 public int hashCode() {
386 return _socialActivity.hashCode();
387 }
388
389 @Override
390 public boolean isCachedModel() {
391 return _socialActivity.isCachedModel();
392 }
393
394 @Override
395 public boolean isClassName(java.lang.String className) {
396 return _socialActivity.isClassName(className);
397 }
398
399 @Override
400 public boolean isEscapedModel() {
401 return _socialActivity.isEscapedModel();
402 }
403
404 @Override
405 public boolean isNew() {
406 return _socialActivity.isNew();
407 }
408
409 @Override
410 public void persist() {
411 _socialActivity.persist();
412 }
413
414
419 @Override
420 public void setActivityId(long activityId) {
421 _socialActivity.setActivityId(activityId);
422 }
423
424
429 @Override
430 public void setActivitySetId(long activitySetId) {
431 _socialActivity.setActivitySetId(activitySetId);
432 }
433
434 @Override
435 public void setAssetEntry(
436 com.liferay.portlet.asset.model.AssetEntry assetEntry) {
437 _socialActivity.setAssetEntry(assetEntry);
438 }
439
440 @Override
441 public void setCachedModel(boolean cachedModel) {
442 _socialActivity.setCachedModel(cachedModel);
443 }
444
445 @Override
446 public void setClassName(java.lang.String className) {
447 _socialActivity.setClassName(className);
448 }
449
450
455 @Override
456 public void setClassNameId(long classNameId) {
457 _socialActivity.setClassNameId(classNameId);
458 }
459
460
465 @Override
466 public void setClassPK(long classPK) {
467 _socialActivity.setClassPK(classPK);
468 }
469
470
475 @Override
476 public void setCompanyId(long companyId) {
477 _socialActivity.setCompanyId(companyId);
478 }
479
480
485 @Override
486 public void setCreateDate(long createDate) {
487 _socialActivity.setCreateDate(createDate);
488 }
489
490 @Override
491 public void setExpandoBridgeAttributes(
492 com.liferay.portal.model.BaseModel<?> baseModel) {
493 _socialActivity.setExpandoBridgeAttributes(baseModel);
494 }
495
496 @Override
497 public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge) {
498 _socialActivity.setExpandoBridgeAttributes(expandoBridge);
499 }
500
501 @Override
502 public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
503 _socialActivity.setExpandoBridgeAttributes(serviceContext);
504 }
505
506
511 @Override
512 public void setExtraData(java.lang.String extraData) {
513 _socialActivity.setExtraData(extraData);
514 }
515
516 @Override
517 public void setExtraDataValue(java.lang.String key, java.lang.String value)
518 throws com.liferay.portal.kernel.json.JSONException {
519 _socialActivity.setExtraDataValue(key, value);
520 }
521
522
527 @Override
528 public void setGroupId(long groupId) {
529 _socialActivity.setGroupId(groupId);
530 }
531
532
537 @Override
538 public void setMirrorActivityId(long mirrorActivityId) {
539 _socialActivity.setMirrorActivityId(mirrorActivityId);
540 }
541
542 @Override
543 public void setNew(boolean n) {
544 _socialActivity.setNew(n);
545 }
546
547
552 @Override
553 public void setParentClassNameId(long parentClassNameId) {
554 _socialActivity.setParentClassNameId(parentClassNameId);
555 }
556
557
562 @Override
563 public void setParentClassPK(long parentClassPK) {
564 _socialActivity.setParentClassPK(parentClassPK);
565 }
566
567
572 @Override
573 public void setPrimaryKey(long primaryKey) {
574 _socialActivity.setPrimaryKey(primaryKey);
575 }
576
577 @Override
578 public void setPrimaryKeyObj(Serializable primaryKeyObj) {
579 _socialActivity.setPrimaryKeyObj(primaryKeyObj);
580 }
581
582
587 @Override
588 public void setReceiverUserId(long receiverUserId) {
589 _socialActivity.setReceiverUserId(receiverUserId);
590 }
591
592
597 @Override
598 public void setReceiverUserUuid(java.lang.String receiverUserUuid) {
599 _socialActivity.setReceiverUserUuid(receiverUserUuid);
600 }
601
602
607 @Override
608 public void setType(int type) {
609 _socialActivity.setType(type);
610 }
611
612
617 @Override
618 public void setUserId(long userId) {
619 _socialActivity.setUserId(userId);
620 }
621
622
627 @Override
628 public void setUserUuid(java.lang.String userUuid) {
629 _socialActivity.setUserUuid(userUuid);
630 }
631
632 @Override
633 public com.liferay.portal.model.CacheModel<com.liferay.portlet.social.model.SocialActivity> toCacheModel() {
634 return _socialActivity.toCacheModel();
635 }
636
637 @Override
638 public com.liferay.portlet.social.model.SocialActivity toEscapedModel() {
639 return new SocialActivityWrapper(_socialActivity.toEscapedModel());
640 }
641
642 @Override
643 public java.lang.String toString() {
644 return _socialActivity.toString();
645 }
646
647 @Override
648 public com.liferay.portlet.social.model.SocialActivity toUnescapedModel() {
649 return new SocialActivityWrapper(_socialActivity.toUnescapedModel());
650 }
651
652 @Override
653 public java.lang.String toXmlString() {
654 return _socialActivity.toXmlString();
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 @Override
678 public SocialActivity getWrappedModel() {
679 return _socialActivity;
680 }
681
682 @Override
683 public boolean isEntityCacheEnabled() {
684 return _socialActivity.isEntityCacheEnabled();
685 }
686
687 @Override
688 public boolean isFinderCacheEnabled() {
689 return _socialActivity.isFinderCacheEnabled();
690 }
691
692 @Override
693 public void resetOriginalValues() {
694 _socialActivity.resetOriginalValues();
695 }
696
697 private final SocialActivity _socialActivity;
698 }