001
014
015 package com.liferay.portlet.expando.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.expando.model.ExpandoTable;
022
023 import java.io.Serializable;
024
025
032 public class ExpandoTableCacheModel implements CacheModel<ExpandoTable>,
033 Serializable {
034 @Override
035 public String toString() {
036 StringBundler sb = new StringBundler(9);
037
038 sb.append("{tableId=");
039 sb.append(tableId);
040 sb.append(", companyId=");
041 sb.append(companyId);
042 sb.append(", classNameId=");
043 sb.append(classNameId);
044 sb.append(", name=");
045 sb.append(name);
046 sb.append("}");
047
048 return sb.toString();
049 }
050
051 public ExpandoTable toEntityModel() {
052 ExpandoTableImpl expandoTableImpl = new ExpandoTableImpl();
053
054 expandoTableImpl.setTableId(tableId);
055 expandoTableImpl.setCompanyId(companyId);
056 expandoTableImpl.setClassNameId(classNameId);
057
058 if (name == null) {
059 expandoTableImpl.setName(StringPool.BLANK);
060 }
061 else {
062 expandoTableImpl.setName(name);
063 }
064
065 expandoTableImpl.resetOriginalValues();
066
067 return expandoTableImpl;
068 }
069
070 public long tableId;
071 public long companyId;
072 public long classNameId;
073 public String name;
074 }