001    /**
002     * Copyright (c) 2000-2011 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.portlet.dynamicdatamapping.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.dynamicdatamapping.model.DDMStorageLink;
022    
023    import java.io.Serializable;
024    
025    /**
026     * The cache model class for representing DDMStorageLink in entity cache.
027     *
028     * @author Brian Wing Shun Chan
029     * @see DDMStorageLink
030     * @generated
031     */
032    public class DDMStorageLinkCacheModel implements CacheModel<DDMStorageLink>,
033            Serializable {
034            @Override
035            public String toString() {
036                    StringBundler sb = new StringBundler(11);
037    
038                    sb.append("{uuid=");
039                    sb.append(uuid);
040                    sb.append(", storageLinkId=");
041                    sb.append(storageLinkId);
042                    sb.append(", classNameId=");
043                    sb.append(classNameId);
044                    sb.append(", classPK=");
045                    sb.append(classPK);
046                    sb.append(", structureId=");
047                    sb.append(structureId);
048                    sb.append("}");
049    
050                    return sb.toString();
051            }
052    
053            public DDMStorageLink toEntityModel() {
054                    DDMStorageLinkImpl ddmStorageLinkImpl = new DDMStorageLinkImpl();
055    
056                    if (uuid == null) {
057                            ddmStorageLinkImpl.setUuid(StringPool.BLANK);
058                    }
059                    else {
060                            ddmStorageLinkImpl.setUuid(uuid);
061                    }
062    
063                    ddmStorageLinkImpl.setStorageLinkId(storageLinkId);
064                    ddmStorageLinkImpl.setClassNameId(classNameId);
065                    ddmStorageLinkImpl.setClassPK(classPK);
066                    ddmStorageLinkImpl.setStructureId(structureId);
067    
068                    ddmStorageLinkImpl.resetOriginalValues();
069    
070                    return ddmStorageLinkImpl;
071            }
072    
073            public String uuid;
074            public long storageLinkId;
075            public long classNameId;
076            public long classPK;
077            public long structureId;
078    }