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