001
014
015 package com.liferay.portlet.messageboards.model.impl;
016
017 import com.liferay.portal.kernel.util.StringBundler;
018 import com.liferay.portal.model.CacheModel;
019
020 import com.liferay.portlet.messageboards.model.MBThreadFlag;
021
022 import java.io.Serializable;
023
024 import java.util.Date;
025
026
033 public class MBThreadFlagCacheModel implements CacheModel<MBThreadFlag>,
034 Serializable {
035 @Override
036 public String toString() {
037 StringBundler sb = new StringBundler(9);
038
039 sb.append("{threadFlagId=");
040 sb.append(threadFlagId);
041 sb.append(", userId=");
042 sb.append(userId);
043 sb.append(", modifiedDate=");
044 sb.append(modifiedDate);
045 sb.append(", threadId=");
046 sb.append(threadId);
047 sb.append("}");
048
049 return sb.toString();
050 }
051
052 public MBThreadFlag toEntityModel() {
053 MBThreadFlagImpl mbThreadFlagImpl = new MBThreadFlagImpl();
054
055 mbThreadFlagImpl.setThreadFlagId(threadFlagId);
056 mbThreadFlagImpl.setUserId(userId);
057
058 if (modifiedDate == Long.MIN_VALUE) {
059 mbThreadFlagImpl.setModifiedDate(null);
060 }
061 else {
062 mbThreadFlagImpl.setModifiedDate(new Date(modifiedDate));
063 }
064
065 mbThreadFlagImpl.setThreadId(threadId);
066
067 mbThreadFlagImpl.resetOriginalValues();
068
069 return mbThreadFlagImpl;
070 }
071
072 public long threadFlagId;
073 public long userId;
074 public long modifiedDate;
075 public long threadId;
076 }