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.messageboards.model.impl;
016    
017    import com.liferay.portal.kernel.util.StringBundler;
018    import com.liferay.portal.model.CacheModel;
019    
020    import com.liferay.portlet.messageboards.model.MBDiscussion;
021    
022    import java.io.Serializable;
023    
024    /**
025     * The cache model class for representing MBDiscussion in entity cache.
026     *
027     * @author Brian Wing Shun Chan
028     * @see MBDiscussion
029     * @generated
030     */
031    public class MBDiscussionCacheModel implements CacheModel<MBDiscussion>,
032            Serializable {
033            @Override
034            public String toString() {
035                    StringBundler sb = new StringBundler(9);
036    
037                    sb.append("{discussionId=");
038                    sb.append(discussionId);
039                    sb.append(", classNameId=");
040                    sb.append(classNameId);
041                    sb.append(", classPK=");
042                    sb.append(classPK);
043                    sb.append(", threadId=");
044                    sb.append(threadId);
045                    sb.append("}");
046    
047                    return sb.toString();
048            }
049    
050            public MBDiscussion toEntityModel() {
051                    MBDiscussionImpl mbDiscussionImpl = new MBDiscussionImpl();
052    
053                    mbDiscussionImpl.setDiscussionId(discussionId);
054                    mbDiscussionImpl.setClassNameId(classNameId);
055                    mbDiscussionImpl.setClassPK(classPK);
056                    mbDiscussionImpl.setThreadId(threadId);
057    
058                    mbDiscussionImpl.resetOriginalValues();
059    
060                    return mbDiscussionImpl;
061            }
062    
063            public long discussionId;
064            public long classNameId;
065            public long classPK;
066            public long threadId;
067    }