001
014
015 package com.liferay.portlet.announcements.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.announcements.model.AnnouncementsDelivery;
022
023 import java.io.Serializable;
024
025
032 public class AnnouncementsDeliveryCacheModel implements CacheModel<AnnouncementsDelivery>,
033 Serializable {
034 @Override
035 public String toString() {
036 StringBundler sb = new StringBundler(15);
037
038 sb.append("{deliveryId=");
039 sb.append(deliveryId);
040 sb.append(", companyId=");
041 sb.append(companyId);
042 sb.append(", userId=");
043 sb.append(userId);
044 sb.append(", type=");
045 sb.append(type);
046 sb.append(", email=");
047 sb.append(email);
048 sb.append(", sms=");
049 sb.append(sms);
050 sb.append(", website=");
051 sb.append(website);
052 sb.append("}");
053
054 return sb.toString();
055 }
056
057 public AnnouncementsDelivery toEntityModel() {
058 AnnouncementsDeliveryImpl announcementsDeliveryImpl = new AnnouncementsDeliveryImpl();
059
060 announcementsDeliveryImpl.setDeliveryId(deliveryId);
061 announcementsDeliveryImpl.setCompanyId(companyId);
062 announcementsDeliveryImpl.setUserId(userId);
063
064 if (type == null) {
065 announcementsDeliveryImpl.setType(StringPool.BLANK);
066 }
067 else {
068 announcementsDeliveryImpl.setType(type);
069 }
070
071 announcementsDeliveryImpl.setEmail(email);
072 announcementsDeliveryImpl.setSms(sms);
073 announcementsDeliveryImpl.setWebsite(website);
074
075 announcementsDeliveryImpl.resetOriginalValues();
076
077 return announcementsDeliveryImpl;
078 }
079
080 public long deliveryId;
081 public long companyId;
082 public long userId;
083 public String type;
084 public boolean email;
085 public boolean sms;
086 public boolean website;
087 }