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 public Class<?> getModelClass() {
039 return SocialActivity.class;
040 }
041
042 public String getModelClassName() {
043 return SocialActivity.class.getName();
044 }
045
046 public Map<String, Object> getModelAttributes() {
047 Map<String, Object> attributes = new HashMap<String, Object>();
048
049 attributes.put("activityId", getActivityId());
050 attributes.put("groupId", getGroupId());
051 attributes.put("companyId", getCompanyId());
052 attributes.put("userId", getUserId());
053 attributes.put("createDate", getCreateDate());
054 attributes.put("mirrorActivityId", getMirrorActivityId());
055 attributes.put("classNameId", getClassNameId());
056 attributes.put("classPK", getClassPK());
057 attributes.put("type", getType());
058 attributes.put("extraData", getExtraData());
059 attributes.put("receiverUserId", getReceiverUserId());
060
061 return attributes;
062 }
063
064 public void setModelAttributes(Map<String, Object> attributes) {
065 Long activityId = (Long)attributes.get("activityId");
066
067 if (activityId != null) {
068 setActivityId(activityId);
069 }
070
071 Long groupId = (Long)attributes.get("groupId");
072
073 if (groupId != null) {
074 setGroupId(groupId);
075 }
076
077 Long companyId = (Long)attributes.get("companyId");
078
079 if (companyId != null) {
080 setCompanyId(companyId);
081 }
082
083 Long userId = (Long)attributes.get("userId");
084
085 if (userId != null) {
086 setUserId(userId);
087 }
088
089 Long createDate = (Long)attributes.get("createDate");
090
091 if (createDate != null) {
092 setCreateDate(createDate);
093 }
094
095 Long mirrorActivityId = (Long)attributes.get("mirrorActivityId");
096
097 if (mirrorActivityId != null) {
098 setMirrorActivityId(mirrorActivityId);
099 }
100
101 Long classNameId = (Long)attributes.get("classNameId");
102
103 if (classNameId != null) {
104 setClassNameId(classNameId);
105 }
106
107 Long classPK = (Long)attributes.get("classPK");
108
109 if (classPK != null) {
110 setClassPK(classPK);
111 }
112
113 Integer type = (Integer)attributes.get("type");
114
115 if (type != null) {
116 setType(type);
117 }
118
119 String extraData = (String)attributes.get("extraData");
120
121 if (extraData != null) {
122 setExtraData(extraData);
123 }
124
125 Long receiverUserId = (Long)attributes.get("receiverUserId");
126
127 if (receiverUserId != null) {
128 setReceiverUserId(receiverUserId);
129 }
130 }
131
132
137 public long getPrimaryKey() {
138 return _socialActivity.getPrimaryKey();
139 }
140
141
146 public void setPrimaryKey(long primaryKey) {
147 _socialActivity.setPrimaryKey(primaryKey);
148 }
149
150
155 public long getActivityId() {
156 return _socialActivity.getActivityId();
157 }
158
159
164 public void setActivityId(long activityId) {
165 _socialActivity.setActivityId(activityId);
166 }
167
168
173 public long getGroupId() {
174 return _socialActivity.getGroupId();
175 }
176
177
182 public void setGroupId(long groupId) {
183 _socialActivity.setGroupId(groupId);
184 }
185
186
191 public long getCompanyId() {
192 return _socialActivity.getCompanyId();
193 }
194
195
200 public void setCompanyId(long companyId) {
201 _socialActivity.setCompanyId(companyId);
202 }
203
204
209 public long getUserId() {
210 return _socialActivity.getUserId();
211 }
212
213
218 public void setUserId(long userId) {
219 _socialActivity.setUserId(userId);
220 }
221
222
228 public java.lang.String getUserUuid()
229 throws com.liferay.portal.kernel.exception.SystemException {
230 return _socialActivity.getUserUuid();
231 }
232
233
238 public void setUserUuid(java.lang.String userUuid) {
239 _socialActivity.setUserUuid(userUuid);
240 }
241
242
247 public long getCreateDate() {
248 return _socialActivity.getCreateDate();
249 }
250
251
256 public void setCreateDate(long createDate) {
257 _socialActivity.setCreateDate(createDate);
258 }
259
260
265 public long getMirrorActivityId() {
266 return _socialActivity.getMirrorActivityId();
267 }
268
269
274 public void setMirrorActivityId(long mirrorActivityId) {
275 _socialActivity.setMirrorActivityId(mirrorActivityId);
276 }
277
278
283 public java.lang.String getClassName() {
284 return _socialActivity.getClassName();
285 }
286
287 public void setClassName(java.lang.String className) {
288 _socialActivity.setClassName(className);
289 }
290
291
296 public long getClassNameId() {
297 return _socialActivity.getClassNameId();
298 }
299
300
305 public void setClassNameId(long classNameId) {
306 _socialActivity.setClassNameId(classNameId);
307 }
308
309
314 public long getClassPK() {
315 return _socialActivity.getClassPK();
316 }
317
318
323 public void setClassPK(long classPK) {
324 _socialActivity.setClassPK(classPK);
325 }
326
327
332 public int getType() {
333 return _socialActivity.getType();
334 }
335
336
341 public void setType(int type) {
342 _socialActivity.setType(type);
343 }
344
345
350 public java.lang.String getExtraData() {
351 return _socialActivity.getExtraData();
352 }
353
354
359 public void setExtraData(java.lang.String extraData) {
360 _socialActivity.setExtraData(extraData);
361 }
362
363
368 public long getReceiverUserId() {
369 return _socialActivity.getReceiverUserId();
370 }
371
372
377 public void setReceiverUserId(long receiverUserId) {
378 _socialActivity.setReceiverUserId(receiverUserId);
379 }
380
381
387 public java.lang.String getReceiverUserUuid()
388 throws com.liferay.portal.kernel.exception.SystemException {
389 return _socialActivity.getReceiverUserUuid();
390 }
391
392
397 public void setReceiverUserUuid(java.lang.String receiverUserUuid) {
398 _socialActivity.setReceiverUserUuid(receiverUserUuid);
399 }
400
401 public boolean isNew() {
402 return _socialActivity.isNew();
403 }
404
405 public void setNew(boolean n) {
406 _socialActivity.setNew(n);
407 }
408
409 public boolean isCachedModel() {
410 return _socialActivity.isCachedModel();
411 }
412
413 public void setCachedModel(boolean cachedModel) {
414 _socialActivity.setCachedModel(cachedModel);
415 }
416
417 public boolean isEscapedModel() {
418 return _socialActivity.isEscapedModel();
419 }
420
421 public java.io.Serializable getPrimaryKeyObj() {
422 return _socialActivity.getPrimaryKeyObj();
423 }
424
425 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
426 _socialActivity.setPrimaryKeyObj(primaryKeyObj);
427 }
428
429 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
430 return _socialActivity.getExpandoBridge();
431 }
432
433 public void setExpandoBridgeAttributes(
434 com.liferay.portal.service.ServiceContext serviceContext) {
435 _socialActivity.setExpandoBridgeAttributes(serviceContext);
436 }
437
438 @Override
439 public java.lang.Object clone() {
440 return new SocialActivityWrapper((SocialActivity)_socialActivity.clone());
441 }
442
443 public int compareTo(
444 com.liferay.portlet.social.model.SocialActivity socialActivity) {
445 return _socialActivity.compareTo(socialActivity);
446 }
447
448 @Override
449 public int hashCode() {
450 return _socialActivity.hashCode();
451 }
452
453 public com.liferay.portal.model.CacheModel<com.liferay.portlet.social.model.SocialActivity> toCacheModel() {
454 return _socialActivity.toCacheModel();
455 }
456
457 public com.liferay.portlet.social.model.SocialActivity toEscapedModel() {
458 return new SocialActivityWrapper(_socialActivity.toEscapedModel());
459 }
460
461 public com.liferay.portlet.social.model.SocialActivity toUnescapedModel() {
462 return new SocialActivityWrapper(_socialActivity.toUnescapedModel());
463 }
464
465 @Override
466 public java.lang.String toString() {
467 return _socialActivity.toString();
468 }
469
470 public java.lang.String toXmlString() {
471 return _socialActivity.toXmlString();
472 }
473
474 public void persist()
475 throws com.liferay.portal.kernel.exception.SystemException {
476 _socialActivity.persist();
477 }
478
479 public com.liferay.portlet.asset.model.AssetEntry getAssetEntry()
480 throws com.liferay.portal.kernel.exception.SystemException {
481 return _socialActivity.getAssetEntry();
482 }
483
484 public void setAssetEntry(
485 com.liferay.portlet.asset.model.AssetEntry assetEntry) {
486 _socialActivity.setAssetEntry(assetEntry);
487 }
488
489 @Override
490 public boolean equals(Object obj) {
491 if (this == obj) {
492 return true;
493 }
494
495 if (!(obj instanceof SocialActivityWrapper)) {
496 return false;
497 }
498
499 SocialActivityWrapper socialActivityWrapper = (SocialActivityWrapper)obj;
500
501 if (Validator.equals(_socialActivity,
502 socialActivityWrapper._socialActivity)) {
503 return true;
504 }
505
506 return false;
507 }
508
509
512 public SocialActivity getWrappedSocialActivity() {
513 return _socialActivity;
514 }
515
516 public SocialActivity getWrappedModel() {
517 return _socialActivity;
518 }
519
520 public void resetOriginalValues() {
521 _socialActivity.resetOriginalValues();
522 }
523
524 private SocialActivity _socialActivity;
525 }