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.LayoutSetBranch;
021    
022    import java.io.Serializable;
023    
024    import java.util.Date;
025    
026    /**
027     * The cache model class for representing LayoutSetBranch in entity cache.
028     *
029     * @author Brian Wing Shun Chan
030     * @see LayoutSetBranch
031     * @generated
032     */
033    public class LayoutSetBranchCacheModel implements CacheModel<LayoutSetBranch>,
034            Serializable {
035            @Override
036            public String toString() {
037                    StringBundler sb = new StringBundler(43);
038    
039                    sb.append("{layoutSetBranchId=");
040                    sb.append(layoutSetBranchId);
041                    sb.append(", groupId=");
042                    sb.append(groupId);
043                    sb.append(", companyId=");
044                    sb.append(companyId);
045                    sb.append(", userId=");
046                    sb.append(userId);
047                    sb.append(", userName=");
048                    sb.append(userName);
049                    sb.append(", createDate=");
050                    sb.append(createDate);
051                    sb.append(", modifiedDate=");
052                    sb.append(modifiedDate);
053                    sb.append(", privateLayout=");
054                    sb.append(privateLayout);
055                    sb.append(", name=");
056                    sb.append(name);
057                    sb.append(", description=");
058                    sb.append(description);
059                    sb.append(", master=");
060                    sb.append(master);
061                    sb.append(", logo=");
062                    sb.append(logo);
063                    sb.append(", logoId=");
064                    sb.append(logoId);
065                    sb.append(", themeId=");
066                    sb.append(themeId);
067                    sb.append(", colorSchemeId=");
068                    sb.append(colorSchemeId);
069                    sb.append(", wapThemeId=");
070                    sb.append(wapThemeId);
071                    sb.append(", wapColorSchemeId=");
072                    sb.append(wapColorSchemeId);
073                    sb.append(", css=");
074                    sb.append(css);
075                    sb.append(", settings=");
076                    sb.append(settings);
077                    sb.append(", layoutSetPrototypeUuid=");
078                    sb.append(layoutSetPrototypeUuid);
079                    sb.append(", layoutSetPrototypeLinkEnabled=");
080                    sb.append(layoutSetPrototypeLinkEnabled);
081                    sb.append("}");
082    
083                    return sb.toString();
084            }
085    
086            public LayoutSetBranch toEntityModel() {
087                    LayoutSetBranchImpl layoutSetBranchImpl = new LayoutSetBranchImpl();
088    
089                    layoutSetBranchImpl.setLayoutSetBranchId(layoutSetBranchId);
090                    layoutSetBranchImpl.setGroupId(groupId);
091                    layoutSetBranchImpl.setCompanyId(companyId);
092                    layoutSetBranchImpl.setUserId(userId);
093    
094                    if (userName == null) {
095                            layoutSetBranchImpl.setUserName(StringPool.BLANK);
096                    }
097                    else {
098                            layoutSetBranchImpl.setUserName(userName);
099                    }
100    
101                    if (createDate == Long.MIN_VALUE) {
102                            layoutSetBranchImpl.setCreateDate(null);
103                    }
104                    else {
105                            layoutSetBranchImpl.setCreateDate(new Date(createDate));
106                    }
107    
108                    if (modifiedDate == Long.MIN_VALUE) {
109                            layoutSetBranchImpl.setModifiedDate(null);
110                    }
111                    else {
112                            layoutSetBranchImpl.setModifiedDate(new Date(modifiedDate));
113                    }
114    
115                    layoutSetBranchImpl.setPrivateLayout(privateLayout);
116    
117                    if (name == null) {
118                            layoutSetBranchImpl.setName(StringPool.BLANK);
119                    }
120                    else {
121                            layoutSetBranchImpl.setName(name);
122                    }
123    
124                    if (description == null) {
125                            layoutSetBranchImpl.setDescription(StringPool.BLANK);
126                    }
127                    else {
128                            layoutSetBranchImpl.setDescription(description);
129                    }
130    
131                    layoutSetBranchImpl.setMaster(master);
132                    layoutSetBranchImpl.setLogo(logo);
133                    layoutSetBranchImpl.setLogoId(logoId);
134    
135                    if (themeId == null) {
136                            layoutSetBranchImpl.setThemeId(StringPool.BLANK);
137                    }
138                    else {
139                            layoutSetBranchImpl.setThemeId(themeId);
140                    }
141    
142                    if (colorSchemeId == null) {
143                            layoutSetBranchImpl.setColorSchemeId(StringPool.BLANK);
144                    }
145                    else {
146                            layoutSetBranchImpl.setColorSchemeId(colorSchemeId);
147                    }
148    
149                    if (wapThemeId == null) {
150                            layoutSetBranchImpl.setWapThemeId(StringPool.BLANK);
151                    }
152                    else {
153                            layoutSetBranchImpl.setWapThemeId(wapThemeId);
154                    }
155    
156                    if (wapColorSchemeId == null) {
157                            layoutSetBranchImpl.setWapColorSchemeId(StringPool.BLANK);
158                    }
159                    else {
160                            layoutSetBranchImpl.setWapColorSchemeId(wapColorSchemeId);
161                    }
162    
163                    if (css == null) {
164                            layoutSetBranchImpl.setCss(StringPool.BLANK);
165                    }
166                    else {
167                            layoutSetBranchImpl.setCss(css);
168                    }
169    
170                    if (settings == null) {
171                            layoutSetBranchImpl.setSettings(StringPool.BLANK);
172                    }
173                    else {
174                            layoutSetBranchImpl.setSettings(settings);
175                    }
176    
177                    if (layoutSetPrototypeUuid == null) {
178                            layoutSetBranchImpl.setLayoutSetPrototypeUuid(StringPool.BLANK);
179                    }
180                    else {
181                            layoutSetBranchImpl.setLayoutSetPrototypeUuid(layoutSetPrototypeUuid);
182                    }
183    
184                    layoutSetBranchImpl.setLayoutSetPrototypeLinkEnabled(layoutSetPrototypeLinkEnabled);
185    
186                    layoutSetBranchImpl.resetOriginalValues();
187    
188                    return layoutSetBranchImpl;
189            }
190    
191            public long layoutSetBranchId;
192            public long groupId;
193            public long companyId;
194            public long userId;
195            public String userName;
196            public long createDate;
197            public long modifiedDate;
198            public boolean privateLayout;
199            public String name;
200            public String description;
201            public boolean master;
202            public boolean logo;
203            public long logoId;
204            public String themeId;
205            public String colorSchemeId;
206            public String wapThemeId;
207            public String wapColorSchemeId;
208            public String css;
209            public String settings;
210            public String layoutSetPrototypeUuid;
211            public boolean layoutSetPrototypeLinkEnabled;
212    }