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.SocialActivityLimit;
022
023 import java.io.Serializable;
024
025
032 public class SocialActivityLimitCacheModel implements CacheModel<SocialActivityLimit>,
033 Serializable {
034 @Override
035 public String toString() {
036 StringBundler sb = new StringBundler(19);
037
038 sb.append("{activityLimitId=");
039 sb.append(activityLimitId);
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(", classNameId=");
047 sb.append(classNameId);
048 sb.append(", classPK=");
049 sb.append(classPK);
050 sb.append(", activityType=");
051 sb.append(activityType);
052 sb.append(", activityCounterName=");
053 sb.append(activityCounterName);
054 sb.append(", value=");
055 sb.append(value);
056 sb.append("}");
057
058 return sb.toString();
059 }
060
061 public SocialActivityLimit toEntityModel() {
062 SocialActivityLimitImpl socialActivityLimitImpl = new SocialActivityLimitImpl();
063
064 socialActivityLimitImpl.setActivityLimitId(activityLimitId);
065 socialActivityLimitImpl.setGroupId(groupId);
066 socialActivityLimitImpl.setCompanyId(companyId);
067 socialActivityLimitImpl.setUserId(userId);
068 socialActivityLimitImpl.setClassNameId(classNameId);
069 socialActivityLimitImpl.setClassPK(classPK);
070 socialActivityLimitImpl.setActivityType(activityType);
071
072 if (activityCounterName == null) {
073 socialActivityLimitImpl.setActivityCounterName(StringPool.BLANK);
074 }
075 else {
076 socialActivityLimitImpl.setActivityCounterName(activityCounterName);
077 }
078
079 if (value == null) {
080 socialActivityLimitImpl.setValue(StringPool.BLANK);
081 }
082 else {
083 socialActivityLimitImpl.setValue(value);
084 }
085
086 socialActivityLimitImpl.resetOriginalValues();
087
088 return socialActivityLimitImpl;
089 }
090
091 public long activityLimitId;
092 public long groupId;
093 public long companyId;
094 public long userId;
095 public long classNameId;
096 public long classPK;
097 public int activityType;
098 public String activityCounterName;
099 public String value;
100 }