001
014
015 package com.liferay.portal.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 import com.liferay.portal.model.UserNotificationEvent;
021
022 import java.io.Serializable;
023
024
031 public class UserNotificationEventCacheModel implements CacheModel<UserNotificationEvent>,
032 Serializable {
033 @Override
034 public String toString() {
035 StringBundler sb = new StringBundler(19);
036
037 sb.append("{uuid=");
038 sb.append(uuid);
039 sb.append(", userNotificationEventId=");
040 sb.append(userNotificationEventId);
041 sb.append(", companyId=");
042 sb.append(companyId);
043 sb.append(", userId=");
044 sb.append(userId);
045 sb.append(", type=");
046 sb.append(type);
047 sb.append(", timestamp=");
048 sb.append(timestamp);
049 sb.append(", deliverBy=");
050 sb.append(deliverBy);
051 sb.append(", payload=");
052 sb.append(payload);
053 sb.append(", archived=");
054 sb.append(archived);
055 sb.append("}");
056
057 return sb.toString();
058 }
059
060 public UserNotificationEvent toEntityModel() {
061 UserNotificationEventImpl userNotificationEventImpl = new UserNotificationEventImpl();
062
063 if (uuid == null) {
064 userNotificationEventImpl.setUuid(StringPool.BLANK);
065 }
066 else {
067 userNotificationEventImpl.setUuid(uuid);
068 }
069
070 userNotificationEventImpl.setUserNotificationEventId(userNotificationEventId);
071 userNotificationEventImpl.setCompanyId(companyId);
072 userNotificationEventImpl.setUserId(userId);
073
074 if (type == null) {
075 userNotificationEventImpl.setType(StringPool.BLANK);
076 }
077 else {
078 userNotificationEventImpl.setType(type);
079 }
080
081 userNotificationEventImpl.setTimestamp(timestamp);
082 userNotificationEventImpl.setDeliverBy(deliverBy);
083
084 if (payload == null) {
085 userNotificationEventImpl.setPayload(StringPool.BLANK);
086 }
087 else {
088 userNotificationEventImpl.setPayload(payload);
089 }
090
091 userNotificationEventImpl.setArchived(archived);
092
093 userNotificationEventImpl.resetOriginalValues();
094
095 return userNotificationEventImpl;
096 }
097
098 public String uuid;
099 public long userNotificationEventId;
100 public long companyId;
101 public long userId;
102 public String type;
103 public long timestamp;
104 public long deliverBy;
105 public String payload;
106 public boolean archived;
107 }