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.JournalContentSearch;
022    
023    import java.io.Serializable;
024    
025    /**
026     * The cache model class for representing JournalContentSearch in entity cache.
027     *
028     * @author Brian Wing Shun Chan
029     * @see JournalContentSearch
030     * @generated
031     */
032    public class JournalContentSearchCacheModel implements CacheModel<JournalContentSearch>,
033            Serializable {
034            @Override
035            public String toString() {
036                    StringBundler sb = new StringBundler(15);
037    
038                    sb.append("{contentSearchId=");
039                    sb.append(contentSearchId);
040                    sb.append(", groupId=");
041                    sb.append(groupId);
042                    sb.append(", companyId=");
043                    sb.append(companyId);
044                    sb.append(", privateLayout=");
045                    sb.append(privateLayout);
046                    sb.append(", layoutId=");
047                    sb.append(layoutId);
048                    sb.append(", portletId=");
049                    sb.append(portletId);
050                    sb.append(", articleId=");
051                    sb.append(articleId);
052                    sb.append("}");
053    
054                    return sb.toString();
055            }
056    
057            public JournalContentSearch toEntityModel() {
058                    JournalContentSearchImpl journalContentSearchImpl = new JournalContentSearchImpl();
059    
060                    journalContentSearchImpl.setContentSearchId(contentSearchId);
061                    journalContentSearchImpl.setGroupId(groupId);
062                    journalContentSearchImpl.setCompanyId(companyId);
063                    journalContentSearchImpl.setPrivateLayout(privateLayout);
064                    journalContentSearchImpl.setLayoutId(layoutId);
065    
066                    if (portletId == null) {
067                            journalContentSearchImpl.setPortletId(StringPool.BLANK);
068                    }
069                    else {
070                            journalContentSearchImpl.setPortletId(portletId);
071                    }
072    
073                    if (articleId == null) {
074                            journalContentSearchImpl.setArticleId(StringPool.BLANK);
075                    }
076                    else {
077                            journalContentSearchImpl.setArticleId(articleId);
078                    }
079    
080                    journalContentSearchImpl.resetOriginalValues();
081    
082                    return journalContentSearchImpl;
083            }
084    
085            public long contentSearchId;
086            public long groupId;
087            public long companyId;
088            public boolean privateLayout;
089            public long layoutId;
090            public String portletId;
091            public String articleId;
092    }