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