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.JournalArticleResource;
022
023 import java.io.Serializable;
024
025
032 public class JournalArticleResourceCacheModel implements CacheModel<JournalArticleResource>,
033 Serializable {
034 @Override
035 public String toString() {
036 StringBundler sb = new StringBundler(9);
037
038 sb.append("{uuid=");
039 sb.append(uuid);
040 sb.append(", resourcePrimKey=");
041 sb.append(resourcePrimKey);
042 sb.append(", groupId=");
043 sb.append(groupId);
044 sb.append(", articleId=");
045 sb.append(articleId);
046 sb.append("}");
047
048 return sb.toString();
049 }
050
051 public JournalArticleResource toEntityModel() {
052 JournalArticleResourceImpl journalArticleResourceImpl = new JournalArticleResourceImpl();
053
054 if (uuid == null) {
055 journalArticleResourceImpl.setUuid(StringPool.BLANK);
056 }
057 else {
058 journalArticleResourceImpl.setUuid(uuid);
059 }
060
061 journalArticleResourceImpl.setResourcePrimKey(resourcePrimKey);
062 journalArticleResourceImpl.setGroupId(groupId);
063
064 if (articleId == null) {
065 journalArticleResourceImpl.setArticleId(StringPool.BLANK);
066 }
067 else {
068 journalArticleResourceImpl.setArticleId(articleId);
069 }
070
071 journalArticleResourceImpl.resetOriginalValues();
072
073 return journalArticleResourceImpl;
074 }
075
076 public String uuid;
077 public long resourcePrimKey;
078 public long groupId;
079 public String articleId;
080 }