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