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