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.SocialActivityLimit;
022    
023    import java.io.Serializable;
024    
025    /**
026     * The cache model class for representing SocialActivityLimit in entity cache.
027     *
028     * @author Brian Wing Shun Chan
029     * @see SocialActivityLimit
030     * @generated
031     */
032    public class SocialActivityLimitCacheModel implements CacheModel<SocialActivityLimit>,
033            Serializable {
034            @Override
035            public String toString() {
036                    StringBundler sb = new StringBundler(19);
037    
038                    sb.append("{activityLimitId=");
039                    sb.append(activityLimitId);
040                    sb.append(", groupId=");
041                    sb.append(groupId);
042                    sb.append(", companyId=");
043                    sb.append(companyId);
044                    sb.append(", userId=");
045                    sb.append(userId);
046                    sb.append(", classNameId=");
047                    sb.append(classNameId);
048                    sb.append(", classPK=");
049                    sb.append(classPK);
050                    sb.append(", activityType=");
051                    sb.append(activityType);
052                    sb.append(", activityCounterName=");
053                    sb.append(activityCounterName);
054                    sb.append(", value=");
055                    sb.append(value);
056                    sb.append("}");
057    
058                    return sb.toString();
059            }
060    
061            public SocialActivityLimit toEntityModel() {
062                    SocialActivityLimitImpl socialActivityLimitImpl = new SocialActivityLimitImpl();
063    
064                    socialActivityLimitImpl.setActivityLimitId(activityLimitId);
065                    socialActivityLimitImpl.setGroupId(groupId);
066                    socialActivityLimitImpl.setCompanyId(companyId);
067                    socialActivityLimitImpl.setUserId(userId);
068                    socialActivityLimitImpl.setClassNameId(classNameId);
069                    socialActivityLimitImpl.setClassPK(classPK);
070                    socialActivityLimitImpl.setActivityType(activityType);
071    
072                    if (activityCounterName == null) {
073                            socialActivityLimitImpl.setActivityCounterName(StringPool.BLANK);
074                    }
075                    else {
076                            socialActivityLimitImpl.setActivityCounterName(activityCounterName);
077                    }
078    
079                    if (value == null) {
080                            socialActivityLimitImpl.setValue(StringPool.BLANK);
081                    }
082                    else {
083                            socialActivityLimitImpl.setValue(value);
084                    }
085    
086                    socialActivityLimitImpl.resetOriginalValues();
087    
088                    return socialActivityLimitImpl;
089            }
090    
091            public long activityLimitId;
092            public long groupId;
093            public long companyId;
094            public long userId;
095            public long classNameId;
096            public long classPK;
097            public int activityType;
098            public String activityCounterName;
099            public String value;
100    }