001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
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    /**
026     * The cache model class for representing JournalArticleResource in entity cache.
027     *
028     * @author Brian Wing Shun Chan
029     * @see JournalArticleResource
030     * @generated
031     */
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    }