001
014
015 package com.liferay.portlet.social.model.impl;
016
017 import com.liferay.portal.kernel.util.StringBundler;
018 import com.liferay.portal.kernel.util.StringPool;
019 import com.liferay.portal.model.CacheModel;
020
021 import com.liferay.portlet.social.model.SocialActivity;
022
023 import java.io.Serializable;
024
025
032 public class SocialActivityCacheModel implements CacheModel<SocialActivity>,
033 Serializable {
034 @Override
035 public String toString() {
036 StringBundler sb = new StringBundler(23);
037
038 sb.append("{activityId=");
039 sb.append(activityId);
040 sb.append(", groupId=");
041 sb.append(groupId);
042 sb.append(", companyId=");
043 sb.append(companyId);
044 sb.append(", userId=");
045 sb.append(userId);
046 sb.append(", createDate=");
047 sb.append(createDate);
048 sb.append(", mirrorActivityId=");
049 sb.append(mirrorActivityId);
050 sb.append(", classNameId=");
051 sb.append(classNameId);
052 sb.append(", classPK=");
053 sb.append(classPK);
054 sb.append(", type=");
055 sb.append(type);
056 sb.append(", extraData=");
057 sb.append(extraData);
058 sb.append(", receiverUserId=");
059 sb.append(receiverUserId);
060 sb.append("}");
061
062 return sb.toString();
063 }
064
065 public SocialActivity toEntityModel() {
066 SocialActivityImpl socialActivityImpl = new SocialActivityImpl();
067
068 socialActivityImpl.setActivityId(activityId);
069 socialActivityImpl.setGroupId(groupId);
070 socialActivityImpl.setCompanyId(companyId);
071 socialActivityImpl.setUserId(userId);
072 socialActivityImpl.setCreateDate(createDate);
073 socialActivityImpl.setMirrorActivityId(mirrorActivityId);
074 socialActivityImpl.setClassNameId(classNameId);
075 socialActivityImpl.setClassPK(classPK);
076 socialActivityImpl.setType(type);
077
078 if (extraData == null) {
079 socialActivityImpl.setExtraData(StringPool.BLANK);
080 }
081 else {
082 socialActivityImpl.setExtraData(extraData);
083 }
084
085 socialActivityImpl.setReceiverUserId(receiverUserId);
086
087 socialActivityImpl.resetOriginalValues();
088
089 return socialActivityImpl;
090 }
091
092 public long activityId;
093 public long groupId;
094 public long companyId;
095 public long userId;
096 public long createDate;
097 public long mirrorActivityId;
098 public long classNameId;
099 public long classPK;
100 public int type;
101 public String extraData;
102 public long receiverUserId;
103 }