001
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
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
173 @Override
174 public long getPrimaryKey() {
175 return _wikiNode.getPrimaryKey();
176 }
177
178
183 @Override
184 public void setPrimaryKey(long primaryKey) {
185 _wikiNode.setPrimaryKey(primaryKey);
186 }
187
188
193 @Override
194 public java.lang.String getUuid() {
195 return _wikiNode.getUuid();
196 }
197
198
203 @Override
204 public void setUuid(java.lang.String uuid) {
205 _wikiNode.setUuid(uuid);
206 }
207
208
213 @Override
214 public long getNodeId() {
215 return _wikiNode.getNodeId();
216 }
217
218
223 @Override
224 public void setNodeId(long nodeId) {
225 _wikiNode.setNodeId(nodeId);
226 }
227
228
233 @Override
234 public long getGroupId() {
235 return _wikiNode.getGroupId();
236 }
237
238
243 @Override
244 public void setGroupId(long groupId) {
245 _wikiNode.setGroupId(groupId);
246 }
247
248
253 @Override
254 public long getCompanyId() {
255 return _wikiNode.getCompanyId();
256 }
257
258
263 @Override
264 public void setCompanyId(long companyId) {
265 _wikiNode.setCompanyId(companyId);
266 }
267
268
273 @Override
274 public long getUserId() {
275 return _wikiNode.getUserId();
276 }
277
278
283 @Override
284 public void setUserId(long userId) {
285 _wikiNode.setUserId(userId);
286 }
287
288
294 @Override
295 public java.lang.String getUserUuid()
296 throws com.liferay.portal.kernel.exception.SystemException {
297 return _wikiNode.getUserUuid();
298 }
299
300
305 @Override
306 public void setUserUuid(java.lang.String userUuid) {
307 _wikiNode.setUserUuid(userUuid);
308 }
309
310
315 @Override
316 public java.lang.String getUserName() {
317 return _wikiNode.getUserName();
318 }
319
320
325 @Override
326 public void setUserName(java.lang.String userName) {
327 _wikiNode.setUserName(userName);
328 }
329
330
335 @Override
336 public java.util.Date getCreateDate() {
337 return _wikiNode.getCreateDate();
338 }
339
340
345 @Override
346 public void setCreateDate(java.util.Date createDate) {
347 _wikiNode.setCreateDate(createDate);
348 }
349
350
355 @Override
356 public java.util.Date getModifiedDate() {
357 return _wikiNode.getModifiedDate();
358 }
359
360
365 @Override
366 public void setModifiedDate(java.util.Date modifiedDate) {
367 _wikiNode.setModifiedDate(modifiedDate);
368 }
369
370
375 @Override
376 public java.lang.String getName() {
377 return _wikiNode.getName();
378 }
379
380
385 @Override
386 public void setName(java.lang.String name) {
387 _wikiNode.setName(name);
388 }
389
390
395 @Override
396 public java.lang.String getDescription() {
397 return _wikiNode.getDescription();
398 }
399
400
405 @Override
406 public void setDescription(java.lang.String description) {
407 _wikiNode.setDescription(description);
408 }
409
410
415 @Override
416 public java.util.Date getLastPostDate() {
417 return _wikiNode.getLastPostDate();
418 }
419
420
425 @Override
426 public void setLastPostDate(java.util.Date lastPostDate) {
427 _wikiNode.setLastPostDate(lastPostDate);
428 }
429
430
435 @Override
436 public int getStatus() {
437 return _wikiNode.getStatus();
438 }
439
440
445 @Override
446 public void setStatus(int status) {
447 _wikiNode.setStatus(status);
448 }
449
450
455 @Override
456 public long getStatusByUserId() {
457 return _wikiNode.getStatusByUserId();
458 }
459
460
465 @Override
466 public void setStatusByUserId(long statusByUserId) {
467 _wikiNode.setStatusByUserId(statusByUserId);
468 }
469
470
476 @Override
477 public java.lang.String getStatusByUserUuid()
478 throws com.liferay.portal.kernel.exception.SystemException {
479 return _wikiNode.getStatusByUserUuid();
480 }
481
482
487 @Override
488 public void setStatusByUserUuid(java.lang.String statusByUserUuid) {
489 _wikiNode.setStatusByUserUuid(statusByUserUuid);
490 }
491
492
497 @Override
498 public java.lang.String getStatusByUserName() {
499 return _wikiNode.getStatusByUserName();
500 }
501
502
507 @Override
508 public void setStatusByUserName(java.lang.String statusByUserName) {
509 _wikiNode.setStatusByUserName(statusByUserName);
510 }
511
512
517 @Override
518 public java.util.Date getStatusDate() {
519 return _wikiNode.getStatusDate();
520 }
521
522
527 @Override
528 public void setStatusDate(java.util.Date statusDate) {
529 _wikiNode.setStatusDate(statusDate);
530 }
531
532
538 @Override
539 public com.liferay.portlet.trash.model.TrashEntry getTrashEntry()
540 throws com.liferay.portal.kernel.exception.PortalException,
541 com.liferay.portal.kernel.exception.SystemException {
542 return _wikiNode.getTrashEntry();
543 }
544
545
550 @Override
551 public long getTrashEntryClassPK() {
552 return _wikiNode.getTrashEntryClassPK();
553 }
554
555
560 @Override
561 public com.liferay.portal.kernel.trash.TrashHandler getTrashHandler() {
562 return _wikiNode.getTrashHandler();
563 }
564
565
570 @Override
571 public boolean isInTrash() {
572 return _wikiNode.isInTrash();
573 }
574
575
581 @Override
582 public boolean isInTrashContainer() {
583 return _wikiNode.isInTrashContainer();
584 }
585
586
589 @Override
590 public boolean getApproved() {
591 return _wikiNode.getApproved();
592 }
593
594
599 @Override
600 public boolean isApproved() {
601 return _wikiNode.isApproved();
602 }
603
604
609 @Override
610 public boolean isDenied() {
611 return _wikiNode.isDenied();
612 }
613
614
619 @Override
620 public boolean isDraft() {
621 return _wikiNode.isDraft();
622 }
623
624
629 @Override
630 public boolean isExpired() {
631 return _wikiNode.isExpired();
632 }
633
634
639 @Override
640 public boolean isInactive() {
641 return _wikiNode.isInactive();
642 }
643
644
649 @Override
650 public boolean isIncomplete() {
651 return _wikiNode.isIncomplete();
652 }
653
654
659 @Override
660 public boolean isPending() {
661 return _wikiNode.isPending();
662 }
663
664
669 @Override
670 public boolean isScheduled() {
671 return _wikiNode.isScheduled();
672 }
673
674
679 @Override
680 public long getContainerModelId() {
681 return _wikiNode.getContainerModelId();
682 }
683
684
689 @Override
690 public void setContainerModelId(long containerModelId) {
691 _wikiNode.setContainerModelId(containerModelId);
692 }
693
694
699 @Override
700 public java.lang.String getContainerModelName() {
701 return _wikiNode.getContainerModelName();
702 }
703
704
709 @Override
710 public long getParentContainerModelId() {
711 return _wikiNode.getParentContainerModelId();
712 }
713
714
719 @Override
720 public void setParentContainerModelId(long parentContainerModelId) {
721 _wikiNode.setParentContainerModelId(parentContainerModelId);
722 }
723
724 @Override
725 public boolean isNew() {
726 return _wikiNode.isNew();
727 }
728
729 @Override
730 public void setNew(boolean n) {
731 _wikiNode.setNew(n);
732 }
733
734 @Override
735 public boolean isCachedModel() {
736 return _wikiNode.isCachedModel();
737 }
738
739 @Override
740 public void setCachedModel(boolean cachedModel) {
741 _wikiNode.setCachedModel(cachedModel);
742 }
743
744 @Override
745 public boolean isEscapedModel() {
746 return _wikiNode.isEscapedModel();
747 }
748
749 @Override
750 public java.io.Serializable getPrimaryKeyObj() {
751 return _wikiNode.getPrimaryKeyObj();
752 }
753
754 @Override
755 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
756 _wikiNode.setPrimaryKeyObj(primaryKeyObj);
757 }
758
759 @Override
760 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
761 return _wikiNode.getExpandoBridge();
762 }
763
764 @Override
765 public void setExpandoBridgeAttributes(
766 com.liferay.portal.model.BaseModel<?> baseModel) {
767 _wikiNode.setExpandoBridgeAttributes(baseModel);
768 }
769
770 @Override
771 public void setExpandoBridgeAttributes(
772 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
773 _wikiNode.setExpandoBridgeAttributes(expandoBridge);
774 }
775
776 @Override
777 public void setExpandoBridgeAttributes(
778 com.liferay.portal.service.ServiceContext serviceContext) {
779 _wikiNode.setExpandoBridgeAttributes(serviceContext);
780 }
781
782 @Override
783 public java.lang.Object clone() {
784 return new WikiNodeWrapper((WikiNode)_wikiNode.clone());
785 }
786
787 @Override
788 public int compareTo(com.liferay.portlet.wiki.model.WikiNode wikiNode) {
789 return _wikiNode.compareTo(wikiNode);
790 }
791
792 @Override
793 public int hashCode() {
794 return _wikiNode.hashCode();
795 }
796
797 @Override
798 public com.liferay.portal.model.CacheModel<com.liferay.portlet.wiki.model.WikiNode> toCacheModel() {
799 return _wikiNode.toCacheModel();
800 }
801
802 @Override
803 public com.liferay.portlet.wiki.model.WikiNode toEscapedModel() {
804 return new WikiNodeWrapper(_wikiNode.toEscapedModel());
805 }
806
807 @Override
808 public com.liferay.portlet.wiki.model.WikiNode toUnescapedModel() {
809 return new WikiNodeWrapper(_wikiNode.toUnescapedModel());
810 }
811
812 @Override
813 public java.lang.String toString() {
814 return _wikiNode.toString();
815 }
816
817 @Override
818 public java.lang.String toXmlString() {
819 return _wikiNode.toXmlString();
820 }
821
822 @Override
823 public void persist()
824 throws com.liferay.portal.kernel.exception.SystemException {
825 _wikiNode.persist();
826 }
827
828 @Override
829 public com.liferay.portal.kernel.repository.model.Folder addAttachmentsFolder()
830 throws com.liferay.portal.kernel.exception.PortalException,
831 com.liferay.portal.kernel.exception.SystemException {
832 return _wikiNode.addAttachmentsFolder();
833 }
834
835 @Override
836 public long getAttachmentsFolderId()
837 throws com.liferay.portal.kernel.exception.SystemException {
838 return _wikiNode.getAttachmentsFolderId();
839 }
840
841 @Override
842 public java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getDeletedAttachmentsFiles()
843 throws com.liferay.portal.kernel.exception.SystemException {
844 return _wikiNode.getDeletedAttachmentsFiles();
845 }
846
847 @Override
848 public boolean isInTrashExplicitly()
849 throws com.liferay.portal.kernel.exception.SystemException {
850 return _wikiNode.isInTrashExplicitly();
851 }
852
853 @Override
854 public boolean equals(Object obj) {
855 if (this == obj) {
856 return true;
857 }
858
859 if (!(obj instanceof WikiNodeWrapper)) {
860 return false;
861 }
862
863 WikiNodeWrapper wikiNodeWrapper = (WikiNodeWrapper)obj;
864
865 if (Validator.equals(_wikiNode, wikiNodeWrapper._wikiNode)) {
866 return true;
867 }
868
869 return false;
870 }
871
872 @Override
873 public StagedModelType getStagedModelType() {
874 return _wikiNode.getStagedModelType();
875 }
876
877
880 public WikiNode getWrappedWikiNode() {
881 return _wikiNode;
882 }
883
884 @Override
885 public WikiNode getWrappedModel() {
886 return _wikiNode;
887 }
888
889 @Override
890 public void resetOriginalValues() {
891 _wikiNode.resetOriginalValues();
892 }
893
894 private WikiNode _wikiNode;
895 }