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.LayoutSetPrototype;
021    
022    import java.io.Serializable;
023    
024    /**
025     * The cache model class for representing LayoutSetPrototype in entity cache.
026     *
027     * @author Brian Wing Shun Chan
028     * @see LayoutSetPrototype
029     * @generated
030     */
031    public class LayoutSetPrototypeCacheModel implements CacheModel<LayoutSetPrototype>,
032            Serializable {
033            @Override
034            public String toString() {
035                    StringBundler sb = new StringBundler(15);
036    
037                    sb.append("{uuid=");
038                    sb.append(uuid);
039                    sb.append(", layoutSetPrototypeId=");
040                    sb.append(layoutSetPrototypeId);
041                    sb.append(", companyId=");
042                    sb.append(companyId);
043                    sb.append(", name=");
044                    sb.append(name);
045                    sb.append(", description=");
046                    sb.append(description);
047                    sb.append(", settings=");
048                    sb.append(settings);
049                    sb.append(", active=");
050                    sb.append(active);
051                    sb.append("}");
052    
053                    return sb.toString();
054            }
055    
056            public LayoutSetPrototype toEntityModel() {
057                    LayoutSetPrototypeImpl layoutSetPrototypeImpl = new LayoutSetPrototypeImpl();
058    
059                    if (uuid == null) {
060                            layoutSetPrototypeImpl.setUuid(StringPool.BLANK);
061                    }
062                    else {
063                            layoutSetPrototypeImpl.setUuid(uuid);
064                    }
065    
066                    layoutSetPrototypeImpl.setLayoutSetPrototypeId(layoutSetPrototypeId);
067                    layoutSetPrototypeImpl.setCompanyId(companyId);
068    
069                    if (name == null) {
070                            layoutSetPrototypeImpl.setName(StringPool.BLANK);
071                    }
072                    else {
073                            layoutSetPrototypeImpl.setName(name);
074                    }
075    
076                    if (description == null) {
077                            layoutSetPrototypeImpl.setDescription(StringPool.BLANK);
078                    }
079                    else {
080                            layoutSetPrototypeImpl.setDescription(description);
081                    }
082    
083                    if (settings == null) {
084                            layoutSetPrototypeImpl.setSettings(StringPool.BLANK);
085                    }
086                    else {
087                            layoutSetPrototypeImpl.setSettings(settings);
088                    }
089    
090                    layoutSetPrototypeImpl.setActive(active);
091    
092                    layoutSetPrototypeImpl.resetOriginalValues();
093    
094                    return layoutSetPrototypeImpl;
095            }
096    
097            public String uuid;
098            public long layoutSetPrototypeId;
099            public long companyId;
100            public String name;
101            public String description;
102            public String settings;
103            public boolean active;
104    }