001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
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.JournalArticleImage;
022    
023    import java.io.Serializable;
024    
025    /**
026     * The cache model class for representing JournalArticleImage in entity cache.
027     *
028     * @author Brian Wing Shun Chan
029     * @see JournalArticleImage
030     * @generated
031     */
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    }