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.LayoutPrototype;
021
022 import java.io.Serializable;
023
024
031 public class LayoutPrototypeCacheModel implements CacheModel<LayoutPrototype>,
032 Serializable {
033 @Override
034 public String toString() {
035 StringBundler sb = new StringBundler(15);
036
037 sb.append("{uuid=");
038 sb.append(uuid);
039 sb.append(", layoutPrototypeId=");
040 sb.append(layoutPrototypeId);
041 sb.append(", companyId=");
042 sb.append(companyId);
043 sb.append(", name=");
044 sb.append(name);
045 sb.append(", description=");
046 sb.append(description);
047 sb.append(", settings=");
048 sb.append(settings);
049 sb.append(", active=");
050 sb.append(active);
051 sb.append("}");
052
053 return sb.toString();
054 }
055
056 public LayoutPrototype toEntityModel() {
057 LayoutPrototypeImpl layoutPrototypeImpl = new LayoutPrototypeImpl();
058
059 if (uuid == null) {
060 layoutPrototypeImpl.setUuid(StringPool.BLANK);
061 }
062 else {
063 layoutPrototypeImpl.setUuid(uuid);
064 }
065
066 layoutPrototypeImpl.setLayoutPrototypeId(layoutPrototypeId);
067 layoutPrototypeImpl.setCompanyId(companyId);
068
069 if (name == null) {
070 layoutPrototypeImpl.setName(StringPool.BLANK);
071 }
072 else {
073 layoutPrototypeImpl.setName(name);
074 }
075
076 if (description == null) {
077 layoutPrototypeImpl.setDescription(StringPool.BLANK);
078 }
079 else {
080 layoutPrototypeImpl.setDescription(description);
081 }
082
083 if (settings == null) {
084 layoutPrototypeImpl.setSettings(StringPool.BLANK);
085 }
086 else {
087 layoutPrototypeImpl.setSettings(settings);
088 }
089
090 layoutPrototypeImpl.setActive(active);
091
092 layoutPrototypeImpl.resetOriginalValues();
093
094 return layoutPrototypeImpl;
095 }
096
097 public String uuid;
098 public long layoutPrototypeId;
099 public long companyId;
100 public String name;
101 public String description;
102 public String settings;
103 public boolean active;
104 }