001
014
015 package com.liferay.portlet.journal.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.journal.model.JournalArticleImage;
022
023 import java.io.Serializable;
024
025
032 public class JournalArticleImageCacheModel implements CacheModel<JournalArticleImage>,
033 Serializable {
034 @Override
035 public String toString() {
036 StringBundler sb = new StringBundler(17);
037
038 sb.append("{articleImageId=");
039 sb.append(articleImageId);
040 sb.append(", groupId=");
041 sb.append(groupId);
042 sb.append(", articleId=");
043 sb.append(articleId);
044 sb.append(", version=");
045 sb.append(version);
046 sb.append(", elInstanceId=");
047 sb.append(elInstanceId);
048 sb.append(", elName=");
049 sb.append(elName);
050 sb.append(", languageId=");
051 sb.append(languageId);
052 sb.append(", tempImage=");
053 sb.append(tempImage);
054 sb.append("}");
055
056 return sb.toString();
057 }
058
059 public JournalArticleImage toEntityModel() {
060 JournalArticleImageImpl journalArticleImageImpl = new JournalArticleImageImpl();
061
062 journalArticleImageImpl.setArticleImageId(articleImageId);
063 journalArticleImageImpl.setGroupId(groupId);
064
065 if (articleId == null) {
066 journalArticleImageImpl.setArticleId(StringPool.BLANK);
067 }
068 else {
069 journalArticleImageImpl.setArticleId(articleId);
070 }
071
072 journalArticleImageImpl.setVersion(version);
073
074 if (elInstanceId == null) {
075 journalArticleImageImpl.setElInstanceId(StringPool.BLANK);
076 }
077 else {
078 journalArticleImageImpl.setElInstanceId(elInstanceId);
079 }
080
081 if (elName == null) {
082 journalArticleImageImpl.setElName(StringPool.BLANK);
083 }
084 else {
085 journalArticleImageImpl.setElName(elName);
086 }
087
088 if (languageId == null) {
089 journalArticleImageImpl.setLanguageId(StringPool.BLANK);
090 }
091 else {
092 journalArticleImageImpl.setLanguageId(languageId);
093 }
094
095 journalArticleImageImpl.setTempImage(tempImage);
096
097 journalArticleImageImpl.resetOriginalValues();
098
099 return journalArticleImageImpl;
100 }
101
102 public long articleImageId;
103 public long groupId;
104 public String articleId;
105 public double version;
106 public String elInstanceId;
107 public String elName;
108 public String languageId;
109 public boolean tempImage;
110 }