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.ListType;
021
022 import java.io.Serializable;
023
024
031 public class ListTypeCacheModel implements CacheModel<ListType>, Serializable {
032 @Override
033 public String toString() {
034 StringBundler sb = new StringBundler(7);
035
036 sb.append("{listTypeId=");
037 sb.append(listTypeId);
038 sb.append(", name=");
039 sb.append(name);
040 sb.append(", type=");
041 sb.append(type);
042 sb.append("}");
043
044 return sb.toString();
045 }
046
047 public ListType toEntityModel() {
048 ListTypeImpl listTypeImpl = new ListTypeImpl();
049
050 listTypeImpl.setListTypeId(listTypeId);
051
052 if (name == null) {
053 listTypeImpl.setName(StringPool.BLANK);
054 }
055 else {
056 listTypeImpl.setName(name);
057 }
058
059 if (type == null) {
060 listTypeImpl.setType(StringPool.BLANK);
061 }
062 else {
063 listTypeImpl.setType(type);
064 }
065
066 listTypeImpl.resetOriginalValues();
067
068 return listTypeImpl;
069 }
070
071 public int listTypeId;
072 public String name;
073 public String type;
074 }