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.portlet.social.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    
021    import com.liferay.portlet.social.model.SocialRequest;
022    
023    import java.io.Serializable;
024    
025    /**
026     * The cache model class for representing SocialRequest in entity cache.
027     *
028     * @author Brian Wing Shun Chan
029     * @see SocialRequest
030     * @generated
031     */
032    public class SocialRequestCacheModel implements CacheModel<SocialRequest>,
033            Serializable {
034            @Override
035            public String toString() {
036                    StringBundler sb = new StringBundler(27);
037    
038                    sb.append("{uuid=");
039                    sb.append(uuid);
040                    sb.append(", requestId=");
041                    sb.append(requestId);
042                    sb.append(", groupId=");
043                    sb.append(groupId);
044                    sb.append(", companyId=");
045                    sb.append(companyId);
046                    sb.append(", userId=");
047                    sb.append(userId);
048                    sb.append(", createDate=");
049                    sb.append(createDate);
050                    sb.append(", modifiedDate=");
051                    sb.append(modifiedDate);
052                    sb.append(", classNameId=");
053                    sb.append(classNameId);
054                    sb.append(", classPK=");
055                    sb.append(classPK);
056                    sb.append(", type=");
057                    sb.append(type);
058                    sb.append(", extraData=");
059                    sb.append(extraData);
060                    sb.append(", receiverUserId=");
061                    sb.append(receiverUserId);
062                    sb.append(", status=");
063                    sb.append(status);
064                    sb.append("}");
065    
066                    return sb.toString();
067            }
068    
069            public SocialRequest toEntityModel() {
070                    SocialRequestImpl socialRequestImpl = new SocialRequestImpl();
071    
072                    if (uuid == null) {
073                            socialRequestImpl.setUuid(StringPool.BLANK);
074                    }
075                    else {
076                            socialRequestImpl.setUuid(uuid);
077                    }
078    
079                    socialRequestImpl.setRequestId(requestId);
080                    socialRequestImpl.setGroupId(groupId);
081                    socialRequestImpl.setCompanyId(companyId);
082                    socialRequestImpl.setUserId(userId);
083                    socialRequestImpl.setCreateDate(createDate);
084                    socialRequestImpl.setModifiedDate(modifiedDate);
085                    socialRequestImpl.setClassNameId(classNameId);
086                    socialRequestImpl.setClassPK(classPK);
087                    socialRequestImpl.setType(type);
088    
089                    if (extraData == null) {
090                            socialRequestImpl.setExtraData(StringPool.BLANK);
091                    }
092                    else {
093                            socialRequestImpl.setExtraData(extraData);
094                    }
095    
096                    socialRequestImpl.setReceiverUserId(receiverUserId);
097                    socialRequestImpl.setStatus(status);
098    
099                    socialRequestImpl.resetOriginalValues();
100    
101                    return socialRequestImpl;
102            }
103    
104            public String uuid;
105            public long requestId;
106            public long groupId;
107            public long companyId;
108            public long userId;
109            public long createDate;
110            public long modifiedDate;
111            public long classNameId;
112            public long classPK;
113            public int type;
114            public String extraData;
115            public long receiverUserId;
116            public int status;
117    }