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.journal.model;
016    
017    import com.liferay.portal.kernel.lar.StagedModelType;
018    import com.liferay.portal.kernel.util.Validator;
019    import com.liferay.portal.model.ModelWrapper;
020    
021    import java.util.Date;
022    import java.util.HashMap;
023    import java.util.Map;
024    
025    /**
026     * <p>
027     * This class is a wrapper for {@link JournalFolder}.
028     * </p>
029     *
030     * @author Brian Wing Shun Chan
031     * @see JournalFolder
032     * @generated
033     */
034    public class JournalFolderWrapper implements JournalFolder,
035            ModelWrapper<JournalFolder> {
036            public JournalFolderWrapper(JournalFolder journalFolder) {
037                    _journalFolder = journalFolder;
038            }
039    
040            @Override
041            public Class<?> getModelClass() {
042                    return JournalFolder.class;
043            }
044    
045            @Override
046            public String getModelClassName() {
047                    return JournalFolder.class.getName();
048            }
049    
050            @Override
051            public Map<String, Object> getModelAttributes() {
052                    Map<String, Object> attributes = new HashMap<String, Object>();
053    
054                    attributes.put("uuid", getUuid());
055                    attributes.put("folderId", getFolderId());
056                    attributes.put("groupId", getGroupId());
057                    attributes.put("companyId", getCompanyId());
058                    attributes.put("userId", getUserId());
059                    attributes.put("userName", getUserName());
060                    attributes.put("createDate", getCreateDate());
061                    attributes.put("modifiedDate", getModifiedDate());
062                    attributes.put("parentFolderId", getParentFolderId());
063                    attributes.put("name", getName());
064                    attributes.put("description", getDescription());
065                    attributes.put("status", getStatus());
066                    attributes.put("statusByUserId", getStatusByUserId());
067                    attributes.put("statusByUserName", getStatusByUserName());
068                    attributes.put("statusDate", getStatusDate());
069    
070                    return attributes;
071            }
072    
073            @Override
074            public void setModelAttributes(Map<String, Object> attributes) {
075                    String uuid = (String)attributes.get("uuid");
076    
077                    if (uuid != null) {
078                            setUuid(uuid);
079                    }
080    
081                    Long folderId = (Long)attributes.get("folderId");
082    
083                    if (folderId != null) {
084                            setFolderId(folderId);
085                    }
086    
087                    Long groupId = (Long)attributes.get("groupId");
088    
089                    if (groupId != null) {
090                            setGroupId(groupId);
091                    }
092    
093                    Long companyId = (Long)attributes.get("companyId");
094    
095                    if (companyId != null) {
096                            setCompanyId(companyId);
097                    }
098    
099                    Long userId = (Long)attributes.get("userId");
100    
101                    if (userId != null) {
102                            setUserId(userId);
103                    }
104    
105                    String userName = (String)attributes.get("userName");
106    
107                    if (userName != null) {
108                            setUserName(userName);
109                    }
110    
111                    Date createDate = (Date)attributes.get("createDate");
112    
113                    if (createDate != null) {
114                            setCreateDate(createDate);
115                    }
116    
117                    Date modifiedDate = (Date)attributes.get("modifiedDate");
118    
119                    if (modifiedDate != null) {
120                            setModifiedDate(modifiedDate);
121                    }
122    
123                    Long parentFolderId = (Long)attributes.get("parentFolderId");
124    
125                    if (parentFolderId != null) {
126                            setParentFolderId(parentFolderId);
127                    }
128    
129                    String name = (String)attributes.get("name");
130    
131                    if (name != null) {
132                            setName(name);
133                    }
134    
135                    String description = (String)attributes.get("description");
136    
137                    if (description != null) {
138                            setDescription(description);
139                    }
140    
141                    Integer status = (Integer)attributes.get("status");
142    
143                    if (status != null) {
144                            setStatus(status);
145                    }
146    
147                    Long statusByUserId = (Long)attributes.get("statusByUserId");
148    
149                    if (statusByUserId != null) {
150                            setStatusByUserId(statusByUserId);
151                    }
152    
153                    String statusByUserName = (String)attributes.get("statusByUserName");
154    
155                    if (statusByUserName != null) {
156                            setStatusByUserName(statusByUserName);
157                    }
158    
159                    Date statusDate = (Date)attributes.get("statusDate");
160    
161                    if (statusDate != null) {
162                            setStatusDate(statusDate);
163                    }
164            }
165    
166            /**
167            * Returns the primary key of this journal folder.
168            *
169            * @return the primary key of this journal folder
170            */
171            @Override
172            public long getPrimaryKey() {
173                    return _journalFolder.getPrimaryKey();
174            }
175    
176            /**
177            * Sets the primary key of this journal folder.
178            *
179            * @param primaryKey the primary key of this journal folder
180            */
181            @Override
182            public void setPrimaryKey(long primaryKey) {
183                    _journalFolder.setPrimaryKey(primaryKey);
184            }
185    
186            /**
187            * Returns the uuid of this journal folder.
188            *
189            * @return the uuid of this journal folder
190            */
191            @Override
192            public java.lang.String getUuid() {
193                    return _journalFolder.getUuid();
194            }
195    
196            /**
197            * Sets the uuid of this journal folder.
198            *
199            * @param uuid the uuid of this journal folder
200            */
201            @Override
202            public void setUuid(java.lang.String uuid) {
203                    _journalFolder.setUuid(uuid);
204            }
205    
206            /**
207            * Returns the folder ID of this journal folder.
208            *
209            * @return the folder ID of this journal folder
210            */
211            @Override
212            public long getFolderId() {
213                    return _journalFolder.getFolderId();
214            }
215    
216            /**
217            * Sets the folder ID of this journal folder.
218            *
219            * @param folderId the folder ID of this journal folder
220            */
221            @Override
222            public void setFolderId(long folderId) {
223                    _journalFolder.setFolderId(folderId);
224            }
225    
226            /**
227            * Returns the group ID of this journal folder.
228            *
229            * @return the group ID of this journal folder
230            */
231            @Override
232            public long getGroupId() {
233                    return _journalFolder.getGroupId();
234            }
235    
236            /**
237            * Sets the group ID of this journal folder.
238            *
239            * @param groupId the group ID of this journal folder
240            */
241            @Override
242            public void setGroupId(long groupId) {
243                    _journalFolder.setGroupId(groupId);
244            }
245    
246            /**
247            * Returns the company ID of this journal folder.
248            *
249            * @return the company ID of this journal folder
250            */
251            @Override
252            public long getCompanyId() {
253                    return _journalFolder.getCompanyId();
254            }
255    
256            /**
257            * Sets the company ID of this journal folder.
258            *
259            * @param companyId the company ID of this journal folder
260            */
261            @Override
262            public void setCompanyId(long companyId) {
263                    _journalFolder.setCompanyId(companyId);
264            }
265    
266            /**
267            * Returns the user ID of this journal folder.
268            *
269            * @return the user ID of this journal folder
270            */
271            @Override
272            public long getUserId() {
273                    return _journalFolder.getUserId();
274            }
275    
276            /**
277            * Sets the user ID of this journal folder.
278            *
279            * @param userId the user ID of this journal folder
280            */
281            @Override
282            public void setUserId(long userId) {
283                    _journalFolder.setUserId(userId);
284            }
285    
286            /**
287            * Returns the user uuid of this journal folder.
288            *
289            * @return the user uuid of this journal folder
290            * @throws SystemException if a system exception occurred
291            */
292            @Override
293            public java.lang.String getUserUuid()
294                    throws com.liferay.portal.kernel.exception.SystemException {
295                    return _journalFolder.getUserUuid();
296            }
297    
298            /**
299            * Sets the user uuid of this journal folder.
300            *
301            * @param userUuid the user uuid of this journal folder
302            */
303            @Override
304            public void setUserUuid(java.lang.String userUuid) {
305                    _journalFolder.setUserUuid(userUuid);
306            }
307    
308            /**
309            * Returns the user name of this journal folder.
310            *
311            * @return the user name of this journal folder
312            */
313            @Override
314            public java.lang.String getUserName() {
315                    return _journalFolder.getUserName();
316            }
317    
318            /**
319            * Sets the user name of this journal folder.
320            *
321            * @param userName the user name of this journal folder
322            */
323            @Override
324            public void setUserName(java.lang.String userName) {
325                    _journalFolder.setUserName(userName);
326            }
327    
328            /**
329            * Returns the create date of this journal folder.
330            *
331            * @return the create date of this journal folder
332            */
333            @Override
334            public java.util.Date getCreateDate() {
335                    return _journalFolder.getCreateDate();
336            }
337    
338            /**
339            * Sets the create date of this journal folder.
340            *
341            * @param createDate the create date of this journal folder
342            */
343            @Override
344            public void setCreateDate(java.util.Date createDate) {
345                    _journalFolder.setCreateDate(createDate);
346            }
347    
348            /**
349            * Returns the modified date of this journal folder.
350            *
351            * @return the modified date of this journal folder
352            */
353            @Override
354            public java.util.Date getModifiedDate() {
355                    return _journalFolder.getModifiedDate();
356            }
357    
358            /**
359            * Sets the modified date of this journal folder.
360            *
361            * @param modifiedDate the modified date of this journal folder
362            */
363            @Override
364            public void setModifiedDate(java.util.Date modifiedDate) {
365                    _journalFolder.setModifiedDate(modifiedDate);
366            }
367    
368            /**
369            * Returns the parent folder ID of this journal folder.
370            *
371            * @return the parent folder ID of this journal folder
372            */
373            @Override
374            public long getParentFolderId() {
375                    return _journalFolder.getParentFolderId();
376            }
377    
378            /**
379            * Sets the parent folder ID of this journal folder.
380            *
381            * @param parentFolderId the parent folder ID of this journal folder
382            */
383            @Override
384            public void setParentFolderId(long parentFolderId) {
385                    _journalFolder.setParentFolderId(parentFolderId);
386            }
387    
388            /**
389            * Returns the name of this journal folder.
390            *
391            * @return the name of this journal folder
392            */
393            @Override
394            public java.lang.String getName() {
395                    return _journalFolder.getName();
396            }
397    
398            /**
399            * Sets the name of this journal folder.
400            *
401            * @param name the name of this journal folder
402            */
403            @Override
404            public void setName(java.lang.String name) {
405                    _journalFolder.setName(name);
406            }
407    
408            /**
409            * Returns the description of this journal folder.
410            *
411            * @return the description of this journal folder
412            */
413            @Override
414            public java.lang.String getDescription() {
415                    return _journalFolder.getDescription();
416            }
417    
418            /**
419            * Sets the description of this journal folder.
420            *
421            * @param description the description of this journal folder
422            */
423            @Override
424            public void setDescription(java.lang.String description) {
425                    _journalFolder.setDescription(description);
426            }
427    
428            /**
429            * Returns the status of this journal folder.
430            *
431            * @return the status of this journal folder
432            */
433            @Override
434            public int getStatus() {
435                    return _journalFolder.getStatus();
436            }
437    
438            /**
439            * Sets the status of this journal folder.
440            *
441            * @param status the status of this journal folder
442            */
443            @Override
444            public void setStatus(int status) {
445                    _journalFolder.setStatus(status);
446            }
447    
448            /**
449            * Returns the status by user ID of this journal folder.
450            *
451            * @return the status by user ID of this journal folder
452            */
453            @Override
454            public long getStatusByUserId() {
455                    return _journalFolder.getStatusByUserId();
456            }
457    
458            /**
459            * Sets the status by user ID of this journal folder.
460            *
461            * @param statusByUserId the status by user ID of this journal folder
462            */
463            @Override
464            public void setStatusByUserId(long statusByUserId) {
465                    _journalFolder.setStatusByUserId(statusByUserId);
466            }
467    
468            /**
469            * Returns the status by user uuid of this journal folder.
470            *
471            * @return the status by user uuid of this journal folder
472            * @throws SystemException if a system exception occurred
473            */
474            @Override
475            public java.lang.String getStatusByUserUuid()
476                    throws com.liferay.portal.kernel.exception.SystemException {
477                    return _journalFolder.getStatusByUserUuid();
478            }
479    
480            /**
481            * Sets the status by user uuid of this journal folder.
482            *
483            * @param statusByUserUuid the status by user uuid of this journal folder
484            */
485            @Override
486            public void setStatusByUserUuid(java.lang.String statusByUserUuid) {
487                    _journalFolder.setStatusByUserUuid(statusByUserUuid);
488            }
489    
490            /**
491            * Returns the status by user name of this journal folder.
492            *
493            * @return the status by user name of this journal folder
494            */
495            @Override
496            public java.lang.String getStatusByUserName() {
497                    return _journalFolder.getStatusByUserName();
498            }
499    
500            /**
501            * Sets the status by user name of this journal folder.
502            *
503            * @param statusByUserName the status by user name of this journal folder
504            */
505            @Override
506            public void setStatusByUserName(java.lang.String statusByUserName) {
507                    _journalFolder.setStatusByUserName(statusByUserName);
508            }
509    
510            /**
511            * Returns the status date of this journal folder.
512            *
513            * @return the status date of this journal folder
514            */
515            @Override
516            public java.util.Date getStatusDate() {
517                    return _journalFolder.getStatusDate();
518            }
519    
520            /**
521            * Sets the status date of this journal folder.
522            *
523            * @param statusDate the status date of this journal folder
524            */
525            @Override
526            public void setStatusDate(java.util.Date statusDate) {
527                    _journalFolder.setStatusDate(statusDate);
528            }
529    
530            /**
531            * @deprecated As of 6.1.0, replaced by {@link #isApproved()}
532            */
533            @Override
534            public boolean getApproved() {
535                    return _journalFolder.getApproved();
536            }
537    
538            /**
539            * Returns <code>true</code> if this journal folder is approved.
540            *
541            * @return <code>true</code> if this journal folder is approved; <code>false</code> otherwise
542            */
543            @Override
544            public boolean isApproved() {
545                    return _journalFolder.isApproved();
546            }
547    
548            /**
549            * Returns <code>true</code> if this journal folder is denied.
550            *
551            * @return <code>true</code> if this journal folder is denied; <code>false</code> otherwise
552            */
553            @Override
554            public boolean isDenied() {
555                    return _journalFolder.isDenied();
556            }
557    
558            /**
559            * Returns <code>true</code> if this journal folder is a draft.
560            *
561            * @return <code>true</code> if this journal folder is a draft; <code>false</code> otherwise
562            */
563            @Override
564            public boolean isDraft() {
565                    return _journalFolder.isDraft();
566            }
567    
568            /**
569            * Returns <code>true</code> if this journal folder is expired.
570            *
571            * @return <code>true</code> if this journal folder is expired; <code>false</code> otherwise
572            */
573            @Override
574            public boolean isExpired() {
575                    return _journalFolder.isExpired();
576            }
577    
578            /**
579            * Returns <code>true</code> if this journal folder is inactive.
580            *
581            * @return <code>true</code> if this journal folder is inactive; <code>false</code> otherwise
582            */
583            @Override
584            public boolean isInactive() {
585                    return _journalFolder.isInactive();
586            }
587    
588            /**
589            * Returns <code>true</code> if this journal folder is incomplete.
590            *
591            * @return <code>true</code> if this journal folder is incomplete; <code>false</code> otherwise
592            */
593            @Override
594            public boolean isIncomplete() {
595                    return _journalFolder.isIncomplete();
596            }
597    
598            /**
599            * Returns <code>true</code> if this journal folder is in the Recycle Bin.
600            *
601            * @return <code>true</code> if this journal folder is in the Recycle Bin; <code>false</code> otherwise
602            */
603            @Override
604            public boolean isInTrash() {
605                    return _journalFolder.isInTrash();
606            }
607    
608            /**
609            * Returns <code>true</code> if this journal folder is pending.
610            *
611            * @return <code>true</code> if this journal folder is pending; <code>false</code> otherwise
612            */
613            @Override
614            public boolean isPending() {
615                    return _journalFolder.isPending();
616            }
617    
618            /**
619            * Returns <code>true</code> if this journal folder is scheduled.
620            *
621            * @return <code>true</code> if this journal folder is scheduled; <code>false</code> otherwise
622            */
623            @Override
624            public boolean isScheduled() {
625                    return _journalFolder.isScheduled();
626            }
627    
628            /**
629            * Returns the container model ID of this journal folder.
630            *
631            * @return the container model ID of this journal folder
632            */
633            @Override
634            public long getContainerModelId() {
635                    return _journalFolder.getContainerModelId();
636            }
637    
638            /**
639            * Sets the container model ID of this journal folder.
640            *
641            * @param container model ID of this journal folder
642            */
643            @Override
644            public void setContainerModelId(long containerModelId) {
645                    _journalFolder.setContainerModelId(containerModelId);
646            }
647    
648            /**
649            * Returns the container name of this journal folder.
650            *
651            * @return the container name of this journal folder
652            */
653            @Override
654            public java.lang.String getContainerModelName() {
655                    return _journalFolder.getContainerModelName();
656            }
657    
658            /**
659            * Returns the parent container model ID of this journal folder.
660            *
661            * @return the parent container model ID of this journal folder
662            */
663            @Override
664            public long getParentContainerModelId() {
665                    return _journalFolder.getParentContainerModelId();
666            }
667    
668            /**
669            * Sets the parent container model ID of this journal folder.
670            *
671            * @param parent container model ID of this journal folder
672            */
673            @Override
674            public void setParentContainerModelId(long parentContainerModelId) {
675                    _journalFolder.setParentContainerModelId(parentContainerModelId);
676            }
677    
678            @Override
679            public boolean isNew() {
680                    return _journalFolder.isNew();
681            }
682    
683            @Override
684            public void setNew(boolean n) {
685                    _journalFolder.setNew(n);
686            }
687    
688            @Override
689            public boolean isCachedModel() {
690                    return _journalFolder.isCachedModel();
691            }
692    
693            @Override
694            public void setCachedModel(boolean cachedModel) {
695                    _journalFolder.setCachedModel(cachedModel);
696            }
697    
698            @Override
699            public boolean isEscapedModel() {
700                    return _journalFolder.isEscapedModel();
701            }
702    
703            @Override
704            public java.io.Serializable getPrimaryKeyObj() {
705                    return _journalFolder.getPrimaryKeyObj();
706            }
707    
708            @Override
709            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
710                    _journalFolder.setPrimaryKeyObj(primaryKeyObj);
711            }
712    
713            @Override
714            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
715                    return _journalFolder.getExpandoBridge();
716            }
717    
718            @Override
719            public void setExpandoBridgeAttributes(
720                    com.liferay.portal.model.BaseModel<?> baseModel) {
721                    _journalFolder.setExpandoBridgeAttributes(baseModel);
722            }
723    
724            @Override
725            public void setExpandoBridgeAttributes(
726                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
727                    _journalFolder.setExpandoBridgeAttributes(expandoBridge);
728            }
729    
730            @Override
731            public void setExpandoBridgeAttributes(
732                    com.liferay.portal.service.ServiceContext serviceContext) {
733                    _journalFolder.setExpandoBridgeAttributes(serviceContext);
734            }
735    
736            @Override
737            public java.lang.Object clone() {
738                    return new JournalFolderWrapper((JournalFolder)_journalFolder.clone());
739            }
740    
741            @Override
742            public int compareTo(
743                    com.liferay.portlet.journal.model.JournalFolder journalFolder) {
744                    return _journalFolder.compareTo(journalFolder);
745            }
746    
747            @Override
748            public int hashCode() {
749                    return _journalFolder.hashCode();
750            }
751    
752            @Override
753            public com.liferay.portal.model.CacheModel<com.liferay.portlet.journal.model.JournalFolder> toCacheModel() {
754                    return _journalFolder.toCacheModel();
755            }
756    
757            @Override
758            public com.liferay.portlet.journal.model.JournalFolder toEscapedModel() {
759                    return new JournalFolderWrapper(_journalFolder.toEscapedModel());
760            }
761    
762            @Override
763            public com.liferay.portlet.journal.model.JournalFolder toUnescapedModel() {
764                    return new JournalFolderWrapper(_journalFolder.toUnescapedModel());
765            }
766    
767            @Override
768            public java.lang.String toString() {
769                    return _journalFolder.toString();
770            }
771    
772            @Override
773            public java.lang.String toXmlString() {
774                    return _journalFolder.toXmlString();
775            }
776    
777            @Override
778            public void persist()
779                    throws com.liferay.portal.kernel.exception.SystemException {
780                    _journalFolder.persist();
781            }
782    
783            @Override
784            public java.util.List<java.lang.Long> getAncestorFolderIds()
785                    throws com.liferay.portal.kernel.exception.PortalException,
786                            com.liferay.portal.kernel.exception.SystemException {
787                    return _journalFolder.getAncestorFolderIds();
788            }
789    
790            @Override
791            public java.util.List<com.liferay.portlet.journal.model.JournalFolder> getAncestors()
792                    throws com.liferay.portal.kernel.exception.PortalException,
793                            com.liferay.portal.kernel.exception.SystemException {
794                    return _journalFolder.getAncestors();
795            }
796    
797            @Override
798            public com.liferay.portlet.journal.model.JournalFolder getParentFolder()
799                    throws com.liferay.portal.kernel.exception.PortalException,
800                            com.liferay.portal.kernel.exception.SystemException {
801                    return _journalFolder.getParentFolder();
802            }
803    
804            @Override
805            public com.liferay.portlet.journal.model.JournalFolder getTrashContainer() {
806                    return _journalFolder.getTrashContainer();
807            }
808    
809            @Override
810            public boolean isInTrashContainer() {
811                    return _journalFolder.isInTrashContainer();
812            }
813    
814            @Override
815            public boolean isRoot() {
816                    return _journalFolder.isRoot();
817            }
818    
819            @Override
820            public boolean equals(Object obj) {
821                    if (this == obj) {
822                            return true;
823                    }
824    
825                    if (!(obj instanceof JournalFolderWrapper)) {
826                            return false;
827                    }
828    
829                    JournalFolderWrapper journalFolderWrapper = (JournalFolderWrapper)obj;
830    
831                    if (Validator.equals(_journalFolder, journalFolderWrapper._journalFolder)) {
832                            return true;
833                    }
834    
835                    return false;
836            }
837    
838            @Override
839            public StagedModelType getStagedModelType() {
840                    return _journalFolder.getStagedModelType();
841            }
842    
843            /**
844             * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel}
845             */
846            public JournalFolder getWrappedJournalFolder() {
847                    return _journalFolder;
848            }
849    
850            @Override
851            public JournalFolder getWrappedModel() {
852                    return _journalFolder;
853            }
854    
855            @Override
856            public void resetOriginalValues() {
857                    _journalFolder.resetOriginalValues();
858            }
859    
860            private JournalFolder _journalFolder;
861    }