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            /**
543            * Returns the trash handler for this wiki node.
544            *
545            * @return the trash handler for this wiki node
546            */
547            @Override
548            public com.liferay.portal.kernel.trash.TrashHandler getTrashHandler() {
549                    return _wikiNode.getTrashHandler();
550            }
551    
552            /**
553            * Returns <code>true</code> if this wiki node is in the Recycle Bin.
554            *
555            * @return <code>true</code> if this wiki node is in the Recycle Bin; <code>false</code> otherwise
556            */
557            @Override
558            public boolean isInTrash() {
559                    return _wikiNode.isInTrash();
560            }
561    
562            /**
563            * Returns <code>true</code> if the parent of this wiki node is in the Recycle Bin.
564            *
565            * @return <code>true</code> if the parent of this wiki node is in the Recycle Bin; <code>false</code> otherwise
566            * @throws SystemException if a system exception occurred
567            */
568            @Override
569            public boolean isInTrashContainer() {
570                    return _wikiNode.isInTrashContainer();
571            }
572    
573            /**
574            * @deprecated As of 6.1.0, replaced by {@link #isApproved()}
575            */
576            @Override
577            public boolean getApproved() {
578                    return _wikiNode.getApproved();
579            }
580    
581            /**
582            * Returns <code>true</code> if this wiki node is approved.
583            *
584            * @return <code>true</code> if this wiki node is approved; <code>false</code> otherwise
585            */
586            @Override
587            public boolean isApproved() {
588                    return _wikiNode.isApproved();
589            }
590    
591            /**
592            * Returns <code>true</code> if this wiki node is denied.
593            *
594            * @return <code>true</code> if this wiki node is denied; <code>false</code> otherwise
595            */
596            @Override
597            public boolean isDenied() {
598                    return _wikiNode.isDenied();
599            }
600    
601            /**
602            * Returns <code>true</code> if this wiki node is a draft.
603            *
604            * @return <code>true</code> if this wiki node is a draft; <code>false</code> otherwise
605            */
606            @Override
607            public boolean isDraft() {
608                    return _wikiNode.isDraft();
609            }
610    
611            /**
612            * Returns <code>true</code> if this wiki node is expired.
613            *
614            * @return <code>true</code> if this wiki node is expired; <code>false</code> otherwise
615            */
616            @Override
617            public boolean isExpired() {
618                    return _wikiNode.isExpired();
619            }
620    
621            /**
622            * Returns <code>true</code> if this wiki node is inactive.
623            *
624            * @return <code>true</code> if this wiki node is inactive; <code>false</code> otherwise
625            */
626            @Override
627            public boolean isInactive() {
628                    return _wikiNode.isInactive();
629            }
630    
631            /**
632            * Returns <code>true</code> if this wiki node is incomplete.
633            *
634            * @return <code>true</code> if this wiki node is incomplete; <code>false</code> otherwise
635            */
636            @Override
637            public boolean isIncomplete() {
638                    return _wikiNode.isIncomplete();
639            }
640    
641            /**
642            * Returns <code>true</code> if this wiki node is pending.
643            *
644            * @return <code>true</code> if this wiki node is pending; <code>false</code> otherwise
645            */
646            @Override
647            public boolean isPending() {
648                    return _wikiNode.isPending();
649            }
650    
651            /**
652            * Returns <code>true</code> if this wiki node is scheduled.
653            *
654            * @return <code>true</code> if this wiki node is scheduled; <code>false</code> otherwise
655            */
656            @Override
657            public boolean isScheduled() {
658                    return _wikiNode.isScheduled();
659            }
660    
661            /**
662            * Returns the container model ID of this wiki node.
663            *
664            * @return the container model ID of this wiki node
665            */
666            @Override
667            public long getContainerModelId() {
668                    return _wikiNode.getContainerModelId();
669            }
670    
671            /**
672            * Sets the container model ID of this wiki node.
673            *
674            * @param container model ID of this wiki node
675            */
676            @Override
677            public void setContainerModelId(long containerModelId) {
678                    _wikiNode.setContainerModelId(containerModelId);
679            }
680    
681            /**
682            * Returns the container name of this wiki node.
683            *
684            * @return the container name of this wiki node
685            */
686            @Override
687            public java.lang.String getContainerModelName() {
688                    return _wikiNode.getContainerModelName();
689            }
690    
691            /**
692            * Returns the parent container model ID of this wiki node.
693            *
694            * @return the parent container model ID of this wiki node
695            */
696            @Override
697            public long getParentContainerModelId() {
698                    return _wikiNode.getParentContainerModelId();
699            }
700    
701            /**
702            * Sets the parent container model ID of this wiki node.
703            *
704            * @param parent container model ID of this wiki node
705            */
706            @Override
707            public void setParentContainerModelId(long parentContainerModelId) {
708                    _wikiNode.setParentContainerModelId(parentContainerModelId);
709            }
710    
711            @Override
712            public boolean isNew() {
713                    return _wikiNode.isNew();
714            }
715    
716            @Override
717            public void setNew(boolean n) {
718                    _wikiNode.setNew(n);
719            }
720    
721            @Override
722            public boolean isCachedModel() {
723                    return _wikiNode.isCachedModel();
724            }
725    
726            @Override
727            public void setCachedModel(boolean cachedModel) {
728                    _wikiNode.setCachedModel(cachedModel);
729            }
730    
731            @Override
732            public boolean isEscapedModel() {
733                    return _wikiNode.isEscapedModel();
734            }
735    
736            @Override
737            public java.io.Serializable getPrimaryKeyObj() {
738                    return _wikiNode.getPrimaryKeyObj();
739            }
740    
741            @Override
742            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
743                    _wikiNode.setPrimaryKeyObj(primaryKeyObj);
744            }
745    
746            @Override
747            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
748                    return _wikiNode.getExpandoBridge();
749            }
750    
751            @Override
752            public void setExpandoBridgeAttributes(
753                    com.liferay.portal.model.BaseModel<?> baseModel) {
754                    _wikiNode.setExpandoBridgeAttributes(baseModel);
755            }
756    
757            @Override
758            public void setExpandoBridgeAttributes(
759                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
760                    _wikiNode.setExpandoBridgeAttributes(expandoBridge);
761            }
762    
763            @Override
764            public void setExpandoBridgeAttributes(
765                    com.liferay.portal.service.ServiceContext serviceContext) {
766                    _wikiNode.setExpandoBridgeAttributes(serviceContext);
767            }
768    
769            @Override
770            public java.lang.Object clone() {
771                    return new WikiNodeWrapper((WikiNode)_wikiNode.clone());
772            }
773    
774            @Override
775            public int compareTo(com.liferay.portlet.wiki.model.WikiNode wikiNode) {
776                    return _wikiNode.compareTo(wikiNode);
777            }
778    
779            @Override
780            public int hashCode() {
781                    return _wikiNode.hashCode();
782            }
783    
784            @Override
785            public com.liferay.portal.model.CacheModel<com.liferay.portlet.wiki.model.WikiNode> toCacheModel() {
786                    return _wikiNode.toCacheModel();
787            }
788    
789            @Override
790            public com.liferay.portlet.wiki.model.WikiNode toEscapedModel() {
791                    return new WikiNodeWrapper(_wikiNode.toEscapedModel());
792            }
793    
794            @Override
795            public com.liferay.portlet.wiki.model.WikiNode toUnescapedModel() {
796                    return new WikiNodeWrapper(_wikiNode.toUnescapedModel());
797            }
798    
799            @Override
800            public java.lang.String toString() {
801                    return _wikiNode.toString();
802            }
803    
804            @Override
805            public java.lang.String toXmlString() {
806                    return _wikiNode.toXmlString();
807            }
808    
809            @Override
810            public void persist()
811                    throws com.liferay.portal.kernel.exception.SystemException {
812                    _wikiNode.persist();
813            }
814    
815            @Override
816            public com.liferay.portal.kernel.repository.model.Folder addAttachmentsFolder()
817                    throws com.liferay.portal.kernel.exception.PortalException,
818                            com.liferay.portal.kernel.exception.SystemException {
819                    return _wikiNode.addAttachmentsFolder();
820            }
821    
822            @Override
823            public long getAttachmentsFolderId()
824                    throws com.liferay.portal.kernel.exception.SystemException {
825                    return _wikiNode.getAttachmentsFolderId();
826            }
827    
828            @Override
829            public java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getDeletedAttachmentsFiles()
830                    throws com.liferay.portal.kernel.exception.SystemException {
831                    return _wikiNode.getDeletedAttachmentsFiles();
832            }
833    
834            @Override
835            public boolean equals(Object obj) {
836                    if (this == obj) {
837                            return true;
838                    }
839    
840                    if (!(obj instanceof WikiNodeWrapper)) {
841                            return false;
842                    }
843    
844                    WikiNodeWrapper wikiNodeWrapper = (WikiNodeWrapper)obj;
845    
846                    if (Validator.equals(_wikiNode, wikiNodeWrapper._wikiNode)) {
847                            return true;
848                    }
849    
850                    return false;
851            }
852    
853            @Override
854            public StagedModelType getStagedModelType() {
855                    return _wikiNode.getStagedModelType();
856            }
857    
858            /**
859             * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel}
860             */
861            public WikiNode getWrappedWikiNode() {
862                    return _wikiNode;
863            }
864    
865            @Override
866            public WikiNode getWrappedModel() {
867                    return _wikiNode;
868            }
869    
870            @Override
871            public void resetOriginalValues() {
872                    _wikiNode.resetOriginalValues();
873            }
874    
875            private WikiNode _wikiNode;
876    }