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