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