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.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    }