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