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 DLFolder}.
027     * </p>
028     *
029     * @author    Brian Wing Shun Chan
030     * @see       DLFolder
031     * @generated
032     */
033    public class DLFolderWrapper implements DLFolder, ModelWrapper<DLFolder> {
034            public DLFolderWrapper(DLFolder dlFolder) {
035                    _dlFolder = dlFolder;
036            }
037    
038            public Class<?> getModelClass() {
039                    return DLFolder.class;
040            }
041    
042            public String getModelClassName() {
043                    return DLFolder.class.getName();
044            }
045    
046            public Map<String, Object> getModelAttributes() {
047                    Map<String, Object> attributes = new HashMap<String, Object>();
048    
049                    attributes.put("uuid", getUuid());
050                    attributes.put("folderId", getFolderId());
051                    attributes.put("groupId", getGroupId());
052                    attributes.put("companyId", getCompanyId());
053                    attributes.put("userId", getUserId());
054                    attributes.put("userName", getUserName());
055                    attributes.put("createDate", getCreateDate());
056                    attributes.put("modifiedDate", getModifiedDate());
057                    attributes.put("repositoryId", getRepositoryId());
058                    attributes.put("mountPoint", getMountPoint());
059                    attributes.put("parentFolderId", getParentFolderId());
060                    attributes.put("name", getName());
061                    attributes.put("description", getDescription());
062                    attributes.put("lastPostDate", getLastPostDate());
063                    attributes.put("defaultFileEntryTypeId", getDefaultFileEntryTypeId());
064                    attributes.put("overrideFileEntryTypes", getOverrideFileEntryTypes());
065    
066                    return attributes;
067            }
068    
069            public void setModelAttributes(Map<String, Object> attributes) {
070                    String uuid = (String)attributes.get("uuid");
071    
072                    if (uuid != null) {
073                            setUuid(uuid);
074                    }
075    
076                    Long folderId = (Long)attributes.get("folderId");
077    
078                    if (folderId != null) {
079                            setFolderId(folderId);
080                    }
081    
082                    Long groupId = (Long)attributes.get("groupId");
083    
084                    if (groupId != null) {
085                            setGroupId(groupId);
086                    }
087    
088                    Long companyId = (Long)attributes.get("companyId");
089    
090                    if (companyId != null) {
091                            setCompanyId(companyId);
092                    }
093    
094                    Long userId = (Long)attributes.get("userId");
095    
096                    if (userId != null) {
097                            setUserId(userId);
098                    }
099    
100                    String userName = (String)attributes.get("userName");
101    
102                    if (userName != null) {
103                            setUserName(userName);
104                    }
105    
106                    Date createDate = (Date)attributes.get("createDate");
107    
108                    if (createDate != null) {
109                            setCreateDate(createDate);
110                    }
111    
112                    Date modifiedDate = (Date)attributes.get("modifiedDate");
113    
114                    if (modifiedDate != null) {
115                            setModifiedDate(modifiedDate);
116                    }
117    
118                    Long repositoryId = (Long)attributes.get("repositoryId");
119    
120                    if (repositoryId != null) {
121                            setRepositoryId(repositoryId);
122                    }
123    
124                    Boolean mountPoint = (Boolean)attributes.get("mountPoint");
125    
126                    if (mountPoint != null) {
127                            setMountPoint(mountPoint);
128                    }
129    
130                    Long parentFolderId = (Long)attributes.get("parentFolderId");
131    
132                    if (parentFolderId != null) {
133                            setParentFolderId(parentFolderId);
134                    }
135    
136                    String name = (String)attributes.get("name");
137    
138                    if (name != null) {
139                            setName(name);
140                    }
141    
142                    String description = (String)attributes.get("description");
143    
144                    if (description != null) {
145                            setDescription(description);
146                    }
147    
148                    Date lastPostDate = (Date)attributes.get("lastPostDate");
149    
150                    if (lastPostDate != null) {
151                            setLastPostDate(lastPostDate);
152                    }
153    
154                    Long defaultFileEntryTypeId = (Long)attributes.get(
155                                    "defaultFileEntryTypeId");
156    
157                    if (defaultFileEntryTypeId != null) {
158                            setDefaultFileEntryTypeId(defaultFileEntryTypeId);
159                    }
160    
161                    Boolean overrideFileEntryTypes = (Boolean)attributes.get(
162                                    "overrideFileEntryTypes");
163    
164                    if (overrideFileEntryTypes != null) {
165                            setOverrideFileEntryTypes(overrideFileEntryTypes);
166                    }
167            }
168    
169            /**
170            * Returns the primary key of this document library folder.
171            *
172            * @return the primary key of this document library folder
173            */
174            public long getPrimaryKey() {
175                    return _dlFolder.getPrimaryKey();
176            }
177    
178            /**
179            * Sets the primary key of this document library folder.
180            *
181            * @param primaryKey the primary key of this document library folder
182            */
183            public void setPrimaryKey(long primaryKey) {
184                    _dlFolder.setPrimaryKey(primaryKey);
185            }
186    
187            /**
188            * Returns the uuid of this document library folder.
189            *
190            * @return the uuid of this document library folder
191            */
192            public java.lang.String getUuid() {
193                    return _dlFolder.getUuid();
194            }
195    
196            /**
197            * Sets the uuid of this document library folder.
198            *
199            * @param uuid the uuid of this document library folder
200            */
201            public void setUuid(java.lang.String uuid) {
202                    _dlFolder.setUuid(uuid);
203            }
204    
205            /**
206            * Returns the folder ID of this document library folder.
207            *
208            * @return the folder ID of this document library folder
209            */
210            public long getFolderId() {
211                    return _dlFolder.getFolderId();
212            }
213    
214            /**
215            * Sets the folder ID of this document library folder.
216            *
217            * @param folderId the folder ID of this document library folder
218            */
219            public void setFolderId(long folderId) {
220                    _dlFolder.setFolderId(folderId);
221            }
222    
223            /**
224            * Returns the group ID of this document library folder.
225            *
226            * @return the group ID of this document library folder
227            */
228            public long getGroupId() {
229                    return _dlFolder.getGroupId();
230            }
231    
232            /**
233            * Sets the group ID of this document library folder.
234            *
235            * @param groupId the group ID of this document library folder
236            */
237            public void setGroupId(long groupId) {
238                    _dlFolder.setGroupId(groupId);
239            }
240    
241            /**
242            * Returns the company ID of this document library folder.
243            *
244            * @return the company ID of this document library folder
245            */
246            public long getCompanyId() {
247                    return _dlFolder.getCompanyId();
248            }
249    
250            /**
251            * Sets the company ID of this document library folder.
252            *
253            * @param companyId the company ID of this document library folder
254            */
255            public void setCompanyId(long companyId) {
256                    _dlFolder.setCompanyId(companyId);
257            }
258    
259            /**
260            * Returns the user ID of this document library folder.
261            *
262            * @return the user ID of this document library folder
263            */
264            public long getUserId() {
265                    return _dlFolder.getUserId();
266            }
267    
268            /**
269            * Sets the user ID of this document library folder.
270            *
271            * @param userId the user ID of this document library folder
272            */
273            public void setUserId(long userId) {
274                    _dlFolder.setUserId(userId);
275            }
276    
277            /**
278            * Returns the user uuid of this document library folder.
279            *
280            * @return the user uuid of this document library folder
281            * @throws SystemException if a system exception occurred
282            */
283            public java.lang.String getUserUuid()
284                    throws com.liferay.portal.kernel.exception.SystemException {
285                    return _dlFolder.getUserUuid();
286            }
287    
288            /**
289            * Sets the user uuid of this document library folder.
290            *
291            * @param userUuid the user uuid of this document library folder
292            */
293            public void setUserUuid(java.lang.String userUuid) {
294                    _dlFolder.setUserUuid(userUuid);
295            }
296    
297            /**
298            * Returns the user name of this document library folder.
299            *
300            * @return the user name of this document library folder
301            */
302            public java.lang.String getUserName() {
303                    return _dlFolder.getUserName();
304            }
305    
306            /**
307            * Sets the user name of this document library folder.
308            *
309            * @param userName the user name of this document library folder
310            */
311            public void setUserName(java.lang.String userName) {
312                    _dlFolder.setUserName(userName);
313            }
314    
315            /**
316            * Returns the create date of this document library folder.
317            *
318            * @return the create date of this document library folder
319            */
320            public java.util.Date getCreateDate() {
321                    return _dlFolder.getCreateDate();
322            }
323    
324            /**
325            * Sets the create date of this document library folder.
326            *
327            * @param createDate the create date of this document library folder
328            */
329            public void setCreateDate(java.util.Date createDate) {
330                    _dlFolder.setCreateDate(createDate);
331            }
332    
333            /**
334            * Returns the modified date of this document library folder.
335            *
336            * @return the modified date of this document library folder
337            */
338            public java.util.Date getModifiedDate() {
339                    return _dlFolder.getModifiedDate();
340            }
341    
342            /**
343            * Sets the modified date of this document library folder.
344            *
345            * @param modifiedDate the modified date of this document library folder
346            */
347            public void setModifiedDate(java.util.Date modifiedDate) {
348                    _dlFolder.setModifiedDate(modifiedDate);
349            }
350    
351            /**
352            * Returns the repository ID of this document library folder.
353            *
354            * @return the repository ID of this document library folder
355            */
356            public long getRepositoryId() {
357                    return _dlFolder.getRepositoryId();
358            }
359    
360            /**
361            * Sets the repository ID of this document library folder.
362            *
363            * @param repositoryId the repository ID of this document library folder
364            */
365            public void setRepositoryId(long repositoryId) {
366                    _dlFolder.setRepositoryId(repositoryId);
367            }
368    
369            /**
370            * Returns the mount point of this document library folder.
371            *
372            * @return the mount point of this document library folder
373            */
374            public boolean getMountPoint() {
375                    return _dlFolder.getMountPoint();
376            }
377    
378            /**
379            * Returns <code>true</code> if this document library folder is mount point.
380            *
381            * @return <code>true</code> if this document library folder is mount point; <code>false</code> otherwise
382            */
383            public boolean isMountPoint() {
384                    return _dlFolder.isMountPoint();
385            }
386    
387            /**
388            * Sets whether this document library folder is mount point.
389            *
390            * @param mountPoint the mount point of this document library folder
391            */
392            public void setMountPoint(boolean mountPoint) {
393                    _dlFolder.setMountPoint(mountPoint);
394            }
395    
396            /**
397            * Returns the parent folder ID of this document library folder.
398            *
399            * @return the parent folder ID of this document library folder
400            */
401            public long getParentFolderId() {
402                    return _dlFolder.getParentFolderId();
403            }
404    
405            /**
406            * Sets the parent folder ID of this document library folder.
407            *
408            * @param parentFolderId the parent folder ID of this document library folder
409            */
410            public void setParentFolderId(long parentFolderId) {
411                    _dlFolder.setParentFolderId(parentFolderId);
412            }
413    
414            /**
415            * Returns the name of this document library folder.
416            *
417            * @return the name of this document library folder
418            */
419            public java.lang.String getName() {
420                    return _dlFolder.getName();
421            }
422    
423            /**
424            * Sets the name of this document library folder.
425            *
426            * @param name the name of this document library folder
427            */
428            public void setName(java.lang.String name) {
429                    _dlFolder.setName(name);
430            }
431    
432            /**
433            * Returns the description of this document library folder.
434            *
435            * @return the description of this document library folder
436            */
437            public java.lang.String getDescription() {
438                    return _dlFolder.getDescription();
439            }
440    
441            /**
442            * Sets the description of this document library folder.
443            *
444            * @param description the description of this document library folder
445            */
446            public void setDescription(java.lang.String description) {
447                    _dlFolder.setDescription(description);
448            }
449    
450            /**
451            * Returns the last post date of this document library folder.
452            *
453            * @return the last post date of this document library folder
454            */
455            public java.util.Date getLastPostDate() {
456                    return _dlFolder.getLastPostDate();
457            }
458    
459            /**
460            * Sets the last post date of this document library folder.
461            *
462            * @param lastPostDate the last post date of this document library folder
463            */
464            public void setLastPostDate(java.util.Date lastPostDate) {
465                    _dlFolder.setLastPostDate(lastPostDate);
466            }
467    
468            /**
469            * Returns the default file entry type ID of this document library folder.
470            *
471            * @return the default file entry type ID of this document library folder
472            */
473            public long getDefaultFileEntryTypeId() {
474                    return _dlFolder.getDefaultFileEntryTypeId();
475            }
476    
477            /**
478            * Sets the default file entry type ID of this document library folder.
479            *
480            * @param defaultFileEntryTypeId the default file entry type ID of this document library folder
481            */
482            public void setDefaultFileEntryTypeId(long defaultFileEntryTypeId) {
483                    _dlFolder.setDefaultFileEntryTypeId(defaultFileEntryTypeId);
484            }
485    
486            /**
487            * Returns the override file entry types of this document library folder.
488            *
489            * @return the override file entry types of this document library folder
490            */
491            public boolean getOverrideFileEntryTypes() {
492                    return _dlFolder.getOverrideFileEntryTypes();
493            }
494    
495            /**
496            * Returns <code>true</code> if this document library folder is override file entry types.
497            *
498            * @return <code>true</code> if this document library folder is override file entry types; <code>false</code> otherwise
499            */
500            public boolean isOverrideFileEntryTypes() {
501                    return _dlFolder.isOverrideFileEntryTypes();
502            }
503    
504            /**
505            * Sets whether this document library folder is override file entry types.
506            *
507            * @param overrideFileEntryTypes the override file entry types of this document library folder
508            */
509            public void setOverrideFileEntryTypes(boolean overrideFileEntryTypes) {
510                    _dlFolder.setOverrideFileEntryTypes(overrideFileEntryTypes);
511            }
512    
513            public boolean isNew() {
514                    return _dlFolder.isNew();
515            }
516    
517            public void setNew(boolean n) {
518                    _dlFolder.setNew(n);
519            }
520    
521            public boolean isCachedModel() {
522                    return _dlFolder.isCachedModel();
523            }
524    
525            public void setCachedModel(boolean cachedModel) {
526                    _dlFolder.setCachedModel(cachedModel);
527            }
528    
529            public boolean isEscapedModel() {
530                    return _dlFolder.isEscapedModel();
531            }
532    
533            public java.io.Serializable getPrimaryKeyObj() {
534                    return _dlFolder.getPrimaryKeyObj();
535            }
536    
537            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
538                    _dlFolder.setPrimaryKeyObj(primaryKeyObj);
539            }
540    
541            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
542                    return _dlFolder.getExpandoBridge();
543            }
544    
545            public void setExpandoBridgeAttributes(
546                    com.liferay.portal.service.ServiceContext serviceContext) {
547                    _dlFolder.setExpandoBridgeAttributes(serviceContext);
548            }
549    
550            @Override
551            public java.lang.Object clone() {
552                    return new DLFolderWrapper((DLFolder)_dlFolder.clone());
553            }
554    
555            public int compareTo(
556                    com.liferay.portlet.documentlibrary.model.DLFolder dlFolder) {
557                    return _dlFolder.compareTo(dlFolder);
558            }
559    
560            @Override
561            public int hashCode() {
562                    return _dlFolder.hashCode();
563            }
564    
565            public com.liferay.portal.model.CacheModel<com.liferay.portlet.documentlibrary.model.DLFolder> toCacheModel() {
566                    return _dlFolder.toCacheModel();
567            }
568    
569            public com.liferay.portlet.documentlibrary.model.DLFolder toEscapedModel() {
570                    return new DLFolderWrapper(_dlFolder.toEscapedModel());
571            }
572    
573            public com.liferay.portlet.documentlibrary.model.DLFolder toUnescapedModel() {
574                    return new DLFolderWrapper(_dlFolder.toUnescapedModel());
575            }
576    
577            @Override
578            public java.lang.String toString() {
579                    return _dlFolder.toString();
580            }
581    
582            public java.lang.String toXmlString() {
583                    return _dlFolder.toXmlString();
584            }
585    
586            public void persist()
587                    throws com.liferay.portal.kernel.exception.SystemException {
588                    _dlFolder.persist();
589            }
590    
591            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getAncestors()
592                    throws com.liferay.portal.kernel.exception.PortalException,
593                            com.liferay.portal.kernel.exception.SystemException {
594                    return _dlFolder.getAncestors();
595            }
596    
597            public com.liferay.portlet.documentlibrary.model.DLFolder getParentFolder()
598                    throws com.liferay.portal.kernel.exception.PortalException,
599                            com.liferay.portal.kernel.exception.SystemException {
600                    return _dlFolder.getParentFolder();
601            }
602    
603            public java.lang.String getPath()
604                    throws com.liferay.portal.kernel.exception.PortalException,
605                            com.liferay.portal.kernel.exception.SystemException {
606                    return _dlFolder.getPath();
607            }
608    
609            public java.lang.String[] getPathArray()
610                    throws com.liferay.portal.kernel.exception.PortalException,
611                            com.liferay.portal.kernel.exception.SystemException {
612                    return _dlFolder.getPathArray();
613            }
614    
615            public boolean hasInheritableLock() {
616                    return _dlFolder.hasInheritableLock();
617            }
618    
619            public boolean hasLock() {
620                    return _dlFolder.hasLock();
621            }
622    
623            public boolean isLocked() {
624                    return _dlFolder.isLocked();
625            }
626    
627            public boolean isRoot() {
628                    return _dlFolder.isRoot();
629            }
630    
631            @Override
632            public boolean equals(Object obj) {
633                    if (this == obj) {
634                            return true;
635                    }
636    
637                    if (!(obj instanceof DLFolderWrapper)) {
638                            return false;
639                    }
640    
641                    DLFolderWrapper dlFolderWrapper = (DLFolderWrapper)obj;
642    
643                    if (Validator.equals(_dlFolder, dlFolderWrapper._dlFolder)) {
644                            return true;
645                    }
646    
647                    return false;
648            }
649    
650            /**
651             * @deprecated Renamed to {@link #getWrappedModel}
652             */
653            public DLFolder getWrappedDLFolder() {
654                    return _dlFolder;
655            }
656    
657            public DLFolder getWrappedModel() {
658                    return _dlFolder;
659            }
660    
661            public void resetOriginalValues() {
662                    _dlFolder.resetOriginalValues();
663            }
664    
665            private DLFolder _dlFolder;
666    }