001    /**
002     * Copyright (c) 2000-2013 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.model.CacheModel;
019    import com.liferay.portal.model.PasswordPolicyRel;
020    
021    import java.io.Externalizable;
022    import java.io.IOException;
023    import java.io.ObjectInput;
024    import java.io.ObjectOutput;
025    
026    /**
027     * The cache model class for representing PasswordPolicyRel in entity cache.
028     *
029     * @author Brian Wing Shun Chan
030     * @see PasswordPolicyRel
031     * @generated
032     */
033    public class PasswordPolicyRelCacheModel implements CacheModel<PasswordPolicyRel>,
034            Externalizable {
035            @Override
036            public String toString() {
037                    StringBundler sb = new StringBundler(9);
038    
039                    sb.append("{passwordPolicyRelId=");
040                    sb.append(passwordPolicyRelId);
041                    sb.append(", passwordPolicyId=");
042                    sb.append(passwordPolicyId);
043                    sb.append(", classNameId=");
044                    sb.append(classNameId);
045                    sb.append(", classPK=");
046                    sb.append(classPK);
047                    sb.append("}");
048    
049                    return sb.toString();
050            }
051    
052            @Override
053            public PasswordPolicyRel toEntityModel() {
054                    PasswordPolicyRelImpl passwordPolicyRelImpl = new PasswordPolicyRelImpl();
055    
056                    passwordPolicyRelImpl.setPasswordPolicyRelId(passwordPolicyRelId);
057                    passwordPolicyRelImpl.setPasswordPolicyId(passwordPolicyId);
058                    passwordPolicyRelImpl.setClassNameId(classNameId);
059                    passwordPolicyRelImpl.setClassPK(classPK);
060    
061                    passwordPolicyRelImpl.resetOriginalValues();
062    
063                    return passwordPolicyRelImpl;
064            }
065    
066            @Override
067            public void readExternal(ObjectInput objectInput) throws IOException {
068                    passwordPolicyRelId = objectInput.readLong();
069                    passwordPolicyId = objectInput.readLong();
070                    classNameId = objectInput.readLong();
071                    classPK = objectInput.readLong();
072            }
073    
074            @Override
075            public void writeExternal(ObjectOutput objectOutput)
076                    throws IOException {
077                    objectOutput.writeLong(passwordPolicyRelId);
078                    objectOutput.writeLong(passwordPolicyId);
079                    objectOutput.writeLong(classNameId);
080                    objectOutput.writeLong(classPK);
081            }
082    
083            public long passwordPolicyRelId;
084            public long passwordPolicyId;
085            public long classNameId;
086            public long classPK;
087    }