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.documentlibrary.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.documentlibrary.model.DLFileEntryMetadata;
022    
023    import java.io.Serializable;
024    
025    /**
026     * The cache model class for representing DLFileEntryMetadata in entity cache.
027     *
028     * @author Brian Wing Shun Chan
029     * @see DLFileEntryMetadata
030     * @generated
031     */
032    public class DLFileEntryMetadataCacheModel implements CacheModel<DLFileEntryMetadata>,
033            Serializable {
034            @Override
035            public String toString() {
036                    StringBundler sb = new StringBundler(15);
037    
038                    sb.append("{uuid=");
039                    sb.append(uuid);
040                    sb.append(", fileEntryMetadataId=");
041                    sb.append(fileEntryMetadataId);
042                    sb.append(", DDMStorageId=");
043                    sb.append(DDMStorageId);
044                    sb.append(", DDMStructureId=");
045                    sb.append(DDMStructureId);
046                    sb.append(", fileEntryTypeId=");
047                    sb.append(fileEntryTypeId);
048                    sb.append(", fileEntryId=");
049                    sb.append(fileEntryId);
050                    sb.append(", fileVersionId=");
051                    sb.append(fileVersionId);
052                    sb.append("}");
053    
054                    return sb.toString();
055            }
056    
057            public DLFileEntryMetadata toEntityModel() {
058                    DLFileEntryMetadataImpl dlFileEntryMetadataImpl = new DLFileEntryMetadataImpl();
059    
060                    if (uuid == null) {
061                            dlFileEntryMetadataImpl.setUuid(StringPool.BLANK);
062                    }
063                    else {
064                            dlFileEntryMetadataImpl.setUuid(uuid);
065                    }
066    
067                    dlFileEntryMetadataImpl.setFileEntryMetadataId(fileEntryMetadataId);
068                    dlFileEntryMetadataImpl.setDDMStorageId(DDMStorageId);
069                    dlFileEntryMetadataImpl.setDDMStructureId(DDMStructureId);
070                    dlFileEntryMetadataImpl.setFileEntryTypeId(fileEntryTypeId);
071                    dlFileEntryMetadataImpl.setFileEntryId(fileEntryId);
072                    dlFileEntryMetadataImpl.setFileVersionId(fileVersionId);
073    
074                    dlFileEntryMetadataImpl.resetOriginalValues();
075    
076                    return dlFileEntryMetadataImpl;
077            }
078    
079            public String uuid;
080            public long fileEntryMetadataId;
081            public long DDMStorageId;
082            public long DDMStructureId;
083            public long fileEntryTypeId;
084            public long fileEntryId;
085            public long fileVersionId;
086    }