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.SocialRelation;
022
023 import java.io.Serializable;
024
025
032 public class SocialRelationCacheModel implements CacheModel<SocialRelation>,
033 Serializable {
034 @Override
035 public String toString() {
036 StringBundler sb = new StringBundler(15);
037
038 sb.append("{uuid=");
039 sb.append(uuid);
040 sb.append(", relationId=");
041 sb.append(relationId);
042 sb.append(", companyId=");
043 sb.append(companyId);
044 sb.append(", createDate=");
045 sb.append(createDate);
046 sb.append(", userId1=");
047 sb.append(userId1);
048 sb.append(", userId2=");
049 sb.append(userId2);
050 sb.append(", type=");
051 sb.append(type);
052 sb.append("}");
053
054 return sb.toString();
055 }
056
057 public SocialRelation toEntityModel() {
058 SocialRelationImpl socialRelationImpl = new SocialRelationImpl();
059
060 if (uuid == null) {
061 socialRelationImpl.setUuid(StringPool.BLANK);
062 }
063 else {
064 socialRelationImpl.setUuid(uuid);
065 }
066
067 socialRelationImpl.setRelationId(relationId);
068 socialRelationImpl.setCompanyId(companyId);
069 socialRelationImpl.setCreateDate(createDate);
070 socialRelationImpl.setUserId1(userId1);
071 socialRelationImpl.setUserId2(userId2);
072 socialRelationImpl.setType(type);
073
074 socialRelationImpl.resetOriginalValues();
075
076 return socialRelationImpl;
077 }
078
079 public String uuid;
080 public long relationId;
081 public long companyId;
082 public long createDate;
083 public long userId1;
084 public long userId2;
085 public int type;
086 }