001    /**
002     * Copyright (c) 2000-2012 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.portal.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    import com.liferay.portal.model.LayoutSet;
021    
022    import java.io.Serializable;
023    
024    import java.util.Date;
025    
026    /**
027     * The cache model class for representing LayoutSet in entity cache.
028     *
029     * @author Brian Wing Shun Chan
030     * @see LayoutSet
031     * @generated
032     */
033    public class LayoutSetCacheModel implements CacheModel<LayoutSet>, Serializable {
034            @Override
035            public String toString() {
036                    StringBundler sb = new StringBundler(35);
037    
038                    sb.append("{layoutSetId=");
039                    sb.append(layoutSetId);
040                    sb.append(", groupId=");
041                    sb.append(groupId);
042                    sb.append(", companyId=");
043                    sb.append(companyId);
044                    sb.append(", createDate=");
045                    sb.append(createDate);
046                    sb.append(", modifiedDate=");
047                    sb.append(modifiedDate);
048                    sb.append(", privateLayout=");
049                    sb.append(privateLayout);
050                    sb.append(", logo=");
051                    sb.append(logo);
052                    sb.append(", logoId=");
053                    sb.append(logoId);
054                    sb.append(", themeId=");
055                    sb.append(themeId);
056                    sb.append(", colorSchemeId=");
057                    sb.append(colorSchemeId);
058                    sb.append(", wapThemeId=");
059                    sb.append(wapThemeId);
060                    sb.append(", wapColorSchemeId=");
061                    sb.append(wapColorSchemeId);
062                    sb.append(", css=");
063                    sb.append(css);
064                    sb.append(", pageCount=");
065                    sb.append(pageCount);
066                    sb.append(", settings=");
067                    sb.append(settings);
068                    sb.append(", layoutSetPrototypeUuid=");
069                    sb.append(layoutSetPrototypeUuid);
070                    sb.append(", layoutSetPrototypeLinkEnabled=");
071                    sb.append(layoutSetPrototypeLinkEnabled);
072                    sb.append("}");
073    
074                    return sb.toString();
075            }
076    
077            public LayoutSet toEntityModel() {
078                    LayoutSetImpl layoutSetImpl = new LayoutSetImpl();
079    
080                    layoutSetImpl.setLayoutSetId(layoutSetId);
081                    layoutSetImpl.setGroupId(groupId);
082                    layoutSetImpl.setCompanyId(companyId);
083    
084                    if (createDate == Long.MIN_VALUE) {
085                            layoutSetImpl.setCreateDate(null);
086                    }
087                    else {
088                            layoutSetImpl.setCreateDate(new Date(createDate));
089                    }
090    
091                    if (modifiedDate == Long.MIN_VALUE) {
092                            layoutSetImpl.setModifiedDate(null);
093                    }
094                    else {
095                            layoutSetImpl.setModifiedDate(new Date(modifiedDate));
096                    }
097    
098                    layoutSetImpl.setPrivateLayout(privateLayout);
099                    layoutSetImpl.setLogo(logo);
100                    layoutSetImpl.setLogoId(logoId);
101    
102                    if (themeId == null) {
103                            layoutSetImpl.setThemeId(StringPool.BLANK);
104                    }
105                    else {
106                            layoutSetImpl.setThemeId(themeId);
107                    }
108    
109                    if (colorSchemeId == null) {
110                            layoutSetImpl.setColorSchemeId(StringPool.BLANK);
111                    }
112                    else {
113                            layoutSetImpl.setColorSchemeId(colorSchemeId);
114                    }
115    
116                    if (wapThemeId == null) {
117                            layoutSetImpl.setWapThemeId(StringPool.BLANK);
118                    }
119                    else {
120                            layoutSetImpl.setWapThemeId(wapThemeId);
121                    }
122    
123                    if (wapColorSchemeId == null) {
124                            layoutSetImpl.setWapColorSchemeId(StringPool.BLANK);
125                    }
126                    else {
127                            layoutSetImpl.setWapColorSchemeId(wapColorSchemeId);
128                    }
129    
130                    if (css == null) {
131                            layoutSetImpl.setCss(StringPool.BLANK);
132                    }
133                    else {
134                            layoutSetImpl.setCss(css);
135                    }
136    
137                    layoutSetImpl.setPageCount(pageCount);
138    
139                    if (settings == null) {
140                            layoutSetImpl.setSettings(StringPool.BLANK);
141                    }
142                    else {
143                            layoutSetImpl.setSettings(settings);
144                    }
145    
146                    if (layoutSetPrototypeUuid == null) {
147                            layoutSetImpl.setLayoutSetPrototypeUuid(StringPool.BLANK);
148                    }
149                    else {
150                            layoutSetImpl.setLayoutSetPrototypeUuid(layoutSetPrototypeUuid);
151                    }
152    
153                    layoutSetImpl.setLayoutSetPrototypeLinkEnabled(layoutSetPrototypeLinkEnabled);
154    
155                    layoutSetImpl.resetOriginalValues();
156    
157                    return layoutSetImpl;
158            }
159    
160            public long layoutSetId;
161            public long groupId;
162            public long companyId;
163            public long createDate;
164            public long modifiedDate;
165            public boolean privateLayout;
166            public boolean logo;
167            public long logoId;
168            public String themeId;
169            public String colorSchemeId;
170            public String wapThemeId;
171            public String wapColorSchemeId;
172            public String css;
173            public int pageCount;
174            public String settings;
175            public String layoutSetPrototypeUuid;
176            public boolean layoutSetPrototypeLinkEnabled;
177    }