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.LayoutRevision;
021
022 import java.io.Serializable;
023
024 import java.util.Date;
025
026
033 public class LayoutRevisionCacheModel implements CacheModel<LayoutRevision>,
034 Serializable {
035 @Override
036 public String toString() {
037 StringBundler sb = new StringBundler(63);
038
039 sb.append("{layoutRevisionId=");
040 sb.append(layoutRevisionId);
041 sb.append(", groupId=");
042 sb.append(groupId);
043 sb.append(", companyId=");
044 sb.append(companyId);
045 sb.append(", userId=");
046 sb.append(userId);
047 sb.append(", userName=");
048 sb.append(userName);
049 sb.append(", createDate=");
050 sb.append(createDate);
051 sb.append(", modifiedDate=");
052 sb.append(modifiedDate);
053 sb.append(", layoutSetBranchId=");
054 sb.append(layoutSetBranchId);
055 sb.append(", layoutBranchId=");
056 sb.append(layoutBranchId);
057 sb.append(", parentLayoutRevisionId=");
058 sb.append(parentLayoutRevisionId);
059 sb.append(", head=");
060 sb.append(head);
061 sb.append(", major=");
062 sb.append(major);
063 sb.append(", plid=");
064 sb.append(plid);
065 sb.append(", privateLayout=");
066 sb.append(privateLayout);
067 sb.append(", name=");
068 sb.append(name);
069 sb.append(", title=");
070 sb.append(title);
071 sb.append(", description=");
072 sb.append(description);
073 sb.append(", keywords=");
074 sb.append(keywords);
075 sb.append(", robots=");
076 sb.append(robots);
077 sb.append(", typeSettings=");
078 sb.append(typeSettings);
079 sb.append(", iconImage=");
080 sb.append(iconImage);
081 sb.append(", iconImageId=");
082 sb.append(iconImageId);
083 sb.append(", themeId=");
084 sb.append(themeId);
085 sb.append(", colorSchemeId=");
086 sb.append(colorSchemeId);
087 sb.append(", wapThemeId=");
088 sb.append(wapThemeId);
089 sb.append(", wapColorSchemeId=");
090 sb.append(wapColorSchemeId);
091 sb.append(", css=");
092 sb.append(css);
093 sb.append(", status=");
094 sb.append(status);
095 sb.append(", statusByUserId=");
096 sb.append(statusByUserId);
097 sb.append(", statusByUserName=");
098 sb.append(statusByUserName);
099 sb.append(", statusDate=");
100 sb.append(statusDate);
101 sb.append("}");
102
103 return sb.toString();
104 }
105
106 public LayoutRevision toEntityModel() {
107 LayoutRevisionImpl layoutRevisionImpl = new LayoutRevisionImpl();
108
109 layoutRevisionImpl.setLayoutRevisionId(layoutRevisionId);
110 layoutRevisionImpl.setGroupId(groupId);
111 layoutRevisionImpl.setCompanyId(companyId);
112 layoutRevisionImpl.setUserId(userId);
113
114 if (userName == null) {
115 layoutRevisionImpl.setUserName(StringPool.BLANK);
116 }
117 else {
118 layoutRevisionImpl.setUserName(userName);
119 }
120
121 if (createDate == Long.MIN_VALUE) {
122 layoutRevisionImpl.setCreateDate(null);
123 }
124 else {
125 layoutRevisionImpl.setCreateDate(new Date(createDate));
126 }
127
128 if (modifiedDate == Long.MIN_VALUE) {
129 layoutRevisionImpl.setModifiedDate(null);
130 }
131 else {
132 layoutRevisionImpl.setModifiedDate(new Date(modifiedDate));
133 }
134
135 layoutRevisionImpl.setLayoutSetBranchId(layoutSetBranchId);
136 layoutRevisionImpl.setLayoutBranchId(layoutBranchId);
137 layoutRevisionImpl.setParentLayoutRevisionId(parentLayoutRevisionId);
138 layoutRevisionImpl.setHead(head);
139 layoutRevisionImpl.setMajor(major);
140 layoutRevisionImpl.setPlid(plid);
141 layoutRevisionImpl.setPrivateLayout(privateLayout);
142
143 if (name == null) {
144 layoutRevisionImpl.setName(StringPool.BLANK);
145 }
146 else {
147 layoutRevisionImpl.setName(name);
148 }
149
150 if (title == null) {
151 layoutRevisionImpl.setTitle(StringPool.BLANK);
152 }
153 else {
154 layoutRevisionImpl.setTitle(title);
155 }
156
157 if (description == null) {
158 layoutRevisionImpl.setDescription(StringPool.BLANK);
159 }
160 else {
161 layoutRevisionImpl.setDescription(description);
162 }
163
164 if (keywords == null) {
165 layoutRevisionImpl.setKeywords(StringPool.BLANK);
166 }
167 else {
168 layoutRevisionImpl.setKeywords(keywords);
169 }
170
171 if (robots == null) {
172 layoutRevisionImpl.setRobots(StringPool.BLANK);
173 }
174 else {
175 layoutRevisionImpl.setRobots(robots);
176 }
177
178 if (typeSettings == null) {
179 layoutRevisionImpl.setTypeSettings(StringPool.BLANK);
180 }
181 else {
182 layoutRevisionImpl.setTypeSettings(typeSettings);
183 }
184
185 layoutRevisionImpl.setIconImage(iconImage);
186 layoutRevisionImpl.setIconImageId(iconImageId);
187
188 if (themeId == null) {
189 layoutRevisionImpl.setThemeId(StringPool.BLANK);
190 }
191 else {
192 layoutRevisionImpl.setThemeId(themeId);
193 }
194
195 if (colorSchemeId == null) {
196 layoutRevisionImpl.setColorSchemeId(StringPool.BLANK);
197 }
198 else {
199 layoutRevisionImpl.setColorSchemeId(colorSchemeId);
200 }
201
202 if (wapThemeId == null) {
203 layoutRevisionImpl.setWapThemeId(StringPool.BLANK);
204 }
205 else {
206 layoutRevisionImpl.setWapThemeId(wapThemeId);
207 }
208
209 if (wapColorSchemeId == null) {
210 layoutRevisionImpl.setWapColorSchemeId(StringPool.BLANK);
211 }
212 else {
213 layoutRevisionImpl.setWapColorSchemeId(wapColorSchemeId);
214 }
215
216 if (css == null) {
217 layoutRevisionImpl.setCss(StringPool.BLANK);
218 }
219 else {
220 layoutRevisionImpl.setCss(css);
221 }
222
223 layoutRevisionImpl.setStatus(status);
224 layoutRevisionImpl.setStatusByUserId(statusByUserId);
225
226 if (statusByUserName == null) {
227 layoutRevisionImpl.setStatusByUserName(StringPool.BLANK);
228 }
229 else {
230 layoutRevisionImpl.setStatusByUserName(statusByUserName);
231 }
232
233 if (statusDate == Long.MIN_VALUE) {
234 layoutRevisionImpl.setStatusDate(null);
235 }
236 else {
237 layoutRevisionImpl.setStatusDate(new Date(statusDate));
238 }
239
240 layoutRevisionImpl.resetOriginalValues();
241
242 return layoutRevisionImpl;
243 }
244
245 public long layoutRevisionId;
246 public long groupId;
247 public long companyId;
248 public long userId;
249 public String userName;
250 public long createDate;
251 public long modifiedDate;
252 public long layoutSetBranchId;
253 public long layoutBranchId;
254 public long parentLayoutRevisionId;
255 public boolean head;
256 public boolean major;
257 public long plid;
258 public boolean privateLayout;
259 public String name;
260 public String title;
261 public String description;
262 public String keywords;
263 public String robots;
264 public String typeSettings;
265 public boolean iconImage;
266 public long iconImageId;
267 public String themeId;
268 public String colorSchemeId;
269 public String wapThemeId;
270 public String wapColorSchemeId;
271 public String css;
272 public int status;
273 public long statusByUserId;
274 public String statusByUserName;
275 public long statusDate;
276 }