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.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.Company;
021    
022    import java.io.Serializable;
023    
024    /**
025     * The cache model class for representing Company in entity cache.
026     *
027     * @author Brian Wing Shun Chan
028     * @see Company
029     * @generated
030     */
031    public class CompanyCacheModel implements CacheModel<Company>, Serializable {
032            @Override
033            public String toString() {
034                    StringBundler sb = new StringBundler(21);
035    
036                    sb.append("{companyId=");
037                    sb.append(companyId);
038                    sb.append(", accountId=");
039                    sb.append(accountId);
040                    sb.append(", webId=");
041                    sb.append(webId);
042                    sb.append(", key=");
043                    sb.append(key);
044                    sb.append(", mx=");
045                    sb.append(mx);
046                    sb.append(", homeURL=");
047                    sb.append(homeURL);
048                    sb.append(", logoId=");
049                    sb.append(logoId);
050                    sb.append(", system=");
051                    sb.append(system);
052                    sb.append(", maxUsers=");
053                    sb.append(maxUsers);
054                    sb.append(", active=");
055                    sb.append(active);
056                    sb.append("}");
057    
058                    return sb.toString();
059            }
060    
061            public Company toEntityModel() {
062                    CompanyImpl companyImpl = new CompanyImpl();
063    
064                    companyImpl.setCompanyId(companyId);
065                    companyImpl.setAccountId(accountId);
066    
067                    if (webId == null) {
068                            companyImpl.setWebId(StringPool.BLANK);
069                    }
070                    else {
071                            companyImpl.setWebId(webId);
072                    }
073    
074                    if (key == null) {
075                            companyImpl.setKey(StringPool.BLANK);
076                    }
077                    else {
078                            companyImpl.setKey(key);
079                    }
080    
081                    if (mx == null) {
082                            companyImpl.setMx(StringPool.BLANK);
083                    }
084                    else {
085                            companyImpl.setMx(mx);
086                    }
087    
088                    if (homeURL == null) {
089                            companyImpl.setHomeURL(StringPool.BLANK);
090                    }
091                    else {
092                            companyImpl.setHomeURL(homeURL);
093                    }
094    
095                    companyImpl.setLogoId(logoId);
096                    companyImpl.setSystem(system);
097                    companyImpl.setMaxUsers(maxUsers);
098                    companyImpl.setActive(active);
099    
100                    companyImpl.resetOriginalValues();
101    
102                    companyImpl.setKeyObj(_keyObj);
103    
104                    return companyImpl;
105            }
106    
107            public long companyId;
108            public long accountId;
109            public String webId;
110            public String key;
111            public String mx;
112            public String homeURL;
113            public long logoId;
114            public boolean system;
115            public int maxUsers;
116            public boolean active;
117            public java.security.Key _keyObj;
118    }