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;
016    
017    import com.liferay.portal.model.ModelWrapper;
018    
019    import java.util.HashMap;
020    import java.util.Map;
021    
022    /**
023     * <p>
024     * This class is a wrapper for {@link DLFileEntryMetadata}.
025     * </p>
026     *
027     * @author    Brian Wing Shun Chan
028     * @see       DLFileEntryMetadata
029     * @generated
030     */
031    public class DLFileEntryMetadataWrapper implements DLFileEntryMetadata,
032            ModelWrapper<DLFileEntryMetadata> {
033            public DLFileEntryMetadataWrapper(DLFileEntryMetadata dlFileEntryMetadata) {
034                    _dlFileEntryMetadata = dlFileEntryMetadata;
035            }
036    
037            public Class<?> getModelClass() {
038                    return DLFileEntryMetadata.class;
039            }
040    
041            public String getModelClassName() {
042                    return DLFileEntryMetadata.class.getName();
043            }
044    
045            public Map<String, Object> getModelAttributes() {
046                    Map<String, Object> attributes = new HashMap<String, Object>();
047    
048                    attributes.put("uuid", getUuid());
049                    attributes.put("fileEntryMetadataId", getFileEntryMetadataId());
050                    attributes.put("DDMStorageId", getDDMStorageId());
051                    attributes.put("DDMStructureId", getDDMStructureId());
052                    attributes.put("fileEntryTypeId", getFileEntryTypeId());
053                    attributes.put("fileEntryId", getFileEntryId());
054                    attributes.put("fileVersionId", getFileVersionId());
055    
056                    return attributes;
057            }
058    
059            public void setModelAttributes(Map<String, Object> attributes) {
060                    String uuid = (String)attributes.get("uuid");
061    
062                    if (uuid != null) {
063                            setUuid(uuid);
064                    }
065    
066                    Long fileEntryMetadataId = (Long)attributes.get("fileEntryMetadataId");
067    
068                    if (fileEntryMetadataId != null) {
069                            setFileEntryMetadataId(fileEntryMetadataId);
070                    }
071    
072                    Long DDMStorageId = (Long)attributes.get("DDMStorageId");
073    
074                    if (DDMStorageId != null) {
075                            setDDMStorageId(DDMStorageId);
076                    }
077    
078                    Long DDMStructureId = (Long)attributes.get("DDMStructureId");
079    
080                    if (DDMStructureId != null) {
081                            setDDMStructureId(DDMStructureId);
082                    }
083    
084                    Long fileEntryTypeId = (Long)attributes.get("fileEntryTypeId");
085    
086                    if (fileEntryTypeId != null) {
087                            setFileEntryTypeId(fileEntryTypeId);
088                    }
089    
090                    Long fileEntryId = (Long)attributes.get("fileEntryId");
091    
092                    if (fileEntryId != null) {
093                            setFileEntryId(fileEntryId);
094                    }
095    
096                    Long fileVersionId = (Long)attributes.get("fileVersionId");
097    
098                    if (fileVersionId != null) {
099                            setFileVersionId(fileVersionId);
100                    }
101            }
102    
103            /**
104            * Returns the primary key of this document library file entry metadata.
105            *
106            * @return the primary key of this document library file entry metadata
107            */
108            public long getPrimaryKey() {
109                    return _dlFileEntryMetadata.getPrimaryKey();
110            }
111    
112            /**
113            * Sets the primary key of this document library file entry metadata.
114            *
115            * @param primaryKey the primary key of this document library file entry metadata
116            */
117            public void setPrimaryKey(long primaryKey) {
118                    _dlFileEntryMetadata.setPrimaryKey(primaryKey);
119            }
120    
121            /**
122            * Returns the uuid of this document library file entry metadata.
123            *
124            * @return the uuid of this document library file entry metadata
125            */
126            public java.lang.String getUuid() {
127                    return _dlFileEntryMetadata.getUuid();
128            }
129    
130            /**
131            * Sets the uuid of this document library file entry metadata.
132            *
133            * @param uuid the uuid of this document library file entry metadata
134            */
135            public void setUuid(java.lang.String uuid) {
136                    _dlFileEntryMetadata.setUuid(uuid);
137            }
138    
139            /**
140            * Returns the file entry metadata ID of this document library file entry metadata.
141            *
142            * @return the file entry metadata ID of this document library file entry metadata
143            */
144            public long getFileEntryMetadataId() {
145                    return _dlFileEntryMetadata.getFileEntryMetadataId();
146            }
147    
148            /**
149            * Sets the file entry metadata ID of this document library file entry metadata.
150            *
151            * @param fileEntryMetadataId the file entry metadata ID of this document library file entry metadata
152            */
153            public void setFileEntryMetadataId(long fileEntryMetadataId) {
154                    _dlFileEntryMetadata.setFileEntryMetadataId(fileEntryMetadataId);
155            }
156    
157            /**
158            * Returns the d d m storage ID of this document library file entry metadata.
159            *
160            * @return the d d m storage ID of this document library file entry metadata
161            */
162            public long getDDMStorageId() {
163                    return _dlFileEntryMetadata.getDDMStorageId();
164            }
165    
166            /**
167            * Sets the d d m storage ID of this document library file entry metadata.
168            *
169            * @param DDMStorageId the d d m storage ID of this document library file entry metadata
170            */
171            public void setDDMStorageId(long DDMStorageId) {
172                    _dlFileEntryMetadata.setDDMStorageId(DDMStorageId);
173            }
174    
175            /**
176            * Returns the d d m structure ID of this document library file entry metadata.
177            *
178            * @return the d d m structure ID of this document library file entry metadata
179            */
180            public long getDDMStructureId() {
181                    return _dlFileEntryMetadata.getDDMStructureId();
182            }
183    
184            /**
185            * Sets the d d m structure ID of this document library file entry metadata.
186            *
187            * @param DDMStructureId the d d m structure ID of this document library file entry metadata
188            */
189            public void setDDMStructureId(long DDMStructureId) {
190                    _dlFileEntryMetadata.setDDMStructureId(DDMStructureId);
191            }
192    
193            /**
194            * Returns the file entry type ID of this document library file entry metadata.
195            *
196            * @return the file entry type ID of this document library file entry metadata
197            */
198            public long getFileEntryTypeId() {
199                    return _dlFileEntryMetadata.getFileEntryTypeId();
200            }
201    
202            /**
203            * Sets the file entry type ID of this document library file entry metadata.
204            *
205            * @param fileEntryTypeId the file entry type ID of this document library file entry metadata
206            */
207            public void setFileEntryTypeId(long fileEntryTypeId) {
208                    _dlFileEntryMetadata.setFileEntryTypeId(fileEntryTypeId);
209            }
210    
211            /**
212            * Returns the file entry ID of this document library file entry metadata.
213            *
214            * @return the file entry ID of this document library file entry metadata
215            */
216            public long getFileEntryId() {
217                    return _dlFileEntryMetadata.getFileEntryId();
218            }
219    
220            /**
221            * Sets the file entry ID of this document library file entry metadata.
222            *
223            * @param fileEntryId the file entry ID of this document library file entry metadata
224            */
225            public void setFileEntryId(long fileEntryId) {
226                    _dlFileEntryMetadata.setFileEntryId(fileEntryId);
227            }
228    
229            /**
230            * Returns the file version ID of this document library file entry metadata.
231            *
232            * @return the file version ID of this document library file entry metadata
233            */
234            public long getFileVersionId() {
235                    return _dlFileEntryMetadata.getFileVersionId();
236            }
237    
238            /**
239            * Sets the file version ID of this document library file entry metadata.
240            *
241            * @param fileVersionId the file version ID of this document library file entry metadata
242            */
243            public void setFileVersionId(long fileVersionId) {
244                    _dlFileEntryMetadata.setFileVersionId(fileVersionId);
245            }
246    
247            public boolean isNew() {
248                    return _dlFileEntryMetadata.isNew();
249            }
250    
251            public void setNew(boolean n) {
252                    _dlFileEntryMetadata.setNew(n);
253            }
254    
255            public boolean isCachedModel() {
256                    return _dlFileEntryMetadata.isCachedModel();
257            }
258    
259            public void setCachedModel(boolean cachedModel) {
260                    _dlFileEntryMetadata.setCachedModel(cachedModel);
261            }
262    
263            public boolean isEscapedModel() {
264                    return _dlFileEntryMetadata.isEscapedModel();
265            }
266    
267            public java.io.Serializable getPrimaryKeyObj() {
268                    return _dlFileEntryMetadata.getPrimaryKeyObj();
269            }
270    
271            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
272                    _dlFileEntryMetadata.setPrimaryKeyObj(primaryKeyObj);
273            }
274    
275            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
276                    return _dlFileEntryMetadata.getExpandoBridge();
277            }
278    
279            public void setExpandoBridgeAttributes(
280                    com.liferay.portal.model.BaseModel<?> baseModel) {
281                    _dlFileEntryMetadata.setExpandoBridgeAttributes(baseModel);
282            }
283    
284            public void setExpandoBridgeAttributes(
285                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
286                    _dlFileEntryMetadata.setExpandoBridgeAttributes(expandoBridge);
287            }
288    
289            public void setExpandoBridgeAttributes(
290                    com.liferay.portal.service.ServiceContext serviceContext) {
291                    _dlFileEntryMetadata.setExpandoBridgeAttributes(serviceContext);
292            }
293    
294            @Override
295            public java.lang.Object clone() {
296                    return new DLFileEntryMetadataWrapper((DLFileEntryMetadata)_dlFileEntryMetadata.clone());
297            }
298    
299            public int compareTo(
300                    com.liferay.portlet.documentlibrary.model.DLFileEntryMetadata dlFileEntryMetadata) {
301                    return _dlFileEntryMetadata.compareTo(dlFileEntryMetadata);
302            }
303    
304            @Override
305            public int hashCode() {
306                    return _dlFileEntryMetadata.hashCode();
307            }
308    
309            public com.liferay.portal.model.CacheModel<com.liferay.portlet.documentlibrary.model.DLFileEntryMetadata> toCacheModel() {
310                    return _dlFileEntryMetadata.toCacheModel();
311            }
312    
313            public com.liferay.portlet.documentlibrary.model.DLFileEntryMetadata toEscapedModel() {
314                    return new DLFileEntryMetadataWrapper(_dlFileEntryMetadata.toEscapedModel());
315            }
316    
317            public com.liferay.portlet.documentlibrary.model.DLFileEntryMetadata toUnescapedModel() {
318                    return new DLFileEntryMetadataWrapper(_dlFileEntryMetadata.toUnescapedModel());
319            }
320    
321            @Override
322            public java.lang.String toString() {
323                    return _dlFileEntryMetadata.toString();
324            }
325    
326            public java.lang.String toXmlString() {
327                    return _dlFileEntryMetadata.toXmlString();
328            }
329    
330            public void persist()
331                    throws com.liferay.portal.kernel.exception.SystemException {
332                    _dlFileEntryMetadata.persist();
333            }
334    
335            public com.liferay.portlet.dynamicdatamapping.model.DDMStructure getDDMStructure()
336                    throws com.liferay.portal.kernel.exception.PortalException,
337                            com.liferay.portal.kernel.exception.SystemException {
338                    return _dlFileEntryMetadata.getDDMStructure();
339            }
340    
341            public com.liferay.portlet.documentlibrary.model.DLFileEntryType getFileEntryType()
342                    throws com.liferay.portal.kernel.exception.PortalException,
343                            com.liferay.portal.kernel.exception.SystemException {
344                    return _dlFileEntryMetadata.getFileEntryType();
345            }
346    
347            public com.liferay.portlet.documentlibrary.model.DLFileVersion getFileVersion()
348                    throws com.liferay.portal.kernel.exception.PortalException,
349                            com.liferay.portal.kernel.exception.SystemException {
350                    return _dlFileEntryMetadata.getFileVersion();
351            }
352    
353            /**
354             * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel}
355             */
356            public DLFileEntryMetadata getWrappedDLFileEntryMetadata() {
357                    return _dlFileEntryMetadata;
358            }
359    
360            public DLFileEntryMetadata getWrappedModel() {
361                    return _dlFileEntryMetadata;
362            }
363    
364            public void resetOriginalValues() {
365                    _dlFileEntryMetadata.resetOriginalValues();
366            }
367    
368            private DLFileEntryMetadata _dlFileEntryMetadata;
369    }