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