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.SocialActivitySetting;
022
023 import java.io.Serializable;
024
025
032 public class SocialActivitySettingCacheModel implements CacheModel<SocialActivitySetting>,
033 Serializable {
034 @Override
035 public String toString() {
036 StringBundler sb = new StringBundler(15);
037
038 sb.append("{activitySettingId=");
039 sb.append(activitySettingId);
040 sb.append(", groupId=");
041 sb.append(groupId);
042 sb.append(", companyId=");
043 sb.append(companyId);
044 sb.append(", classNameId=");
045 sb.append(classNameId);
046 sb.append(", activityType=");
047 sb.append(activityType);
048 sb.append(", name=");
049 sb.append(name);
050 sb.append(", value=");
051 sb.append(value);
052 sb.append("}");
053
054 return sb.toString();
055 }
056
057 public SocialActivitySetting toEntityModel() {
058 SocialActivitySettingImpl socialActivitySettingImpl = new SocialActivitySettingImpl();
059
060 socialActivitySettingImpl.setActivitySettingId(activitySettingId);
061 socialActivitySettingImpl.setGroupId(groupId);
062 socialActivitySettingImpl.setCompanyId(companyId);
063 socialActivitySettingImpl.setClassNameId(classNameId);
064 socialActivitySettingImpl.setActivityType(activityType);
065
066 if (name == null) {
067 socialActivitySettingImpl.setName(StringPool.BLANK);
068 }
069 else {
070 socialActivitySettingImpl.setName(name);
071 }
072
073 if (value == null) {
074 socialActivitySettingImpl.setValue(StringPool.BLANK);
075 }
076 else {
077 socialActivitySettingImpl.setValue(value);
078 }
079
080 socialActivitySettingImpl.resetOriginalValues();
081
082 return socialActivitySettingImpl;
083 }
084
085 public long activitySettingId;
086 public long groupId;
087 public long companyId;
088 public long classNameId;
089 public int activityType;
090 public String name;
091 public String value;
092 }