001
014
015 package com.liferay.portlet.wiki.model;
016
017 import com.liferay.portal.kernel.util.Validator;
018 import com.liferay.portal.model.ModelWrapper;
019
020 import java.util.Date;
021 import java.util.HashMap;
022 import java.util.Map;
023
024
033 public class WikiPageWrapper implements WikiPage, ModelWrapper<WikiPage> {
034 public WikiPageWrapper(WikiPage wikiPage) {
035 _wikiPage = wikiPage;
036 }
037
038 public Class<?> getModelClass() {
039 return WikiPage.class;
040 }
041
042 public String getModelClassName() {
043 return WikiPage.class.getName();
044 }
045
046 public Map<String, Object> getModelAttributes() {
047 Map<String, Object> attributes = new HashMap<String, Object>();
048
049 attributes.put("uuid", getUuid());
050 attributes.put("pageId", getPageId());
051 attributes.put("resourcePrimKey", getResourcePrimKey());
052 attributes.put("groupId", getGroupId());
053 attributes.put("companyId", getCompanyId());
054 attributes.put("userId", getUserId());
055 attributes.put("userName", getUserName());
056 attributes.put("createDate", getCreateDate());
057 attributes.put("modifiedDate", getModifiedDate());
058 attributes.put("nodeId", getNodeId());
059 attributes.put("title", getTitle());
060 attributes.put("version", getVersion());
061 attributes.put("minorEdit", getMinorEdit());
062 attributes.put("content", getContent());
063 attributes.put("summary", getSummary());
064 attributes.put("format", getFormat());
065 attributes.put("head", getHead());
066 attributes.put("parentTitle", getParentTitle());
067 attributes.put("redirectTitle", getRedirectTitle());
068 attributes.put("status", getStatus());
069 attributes.put("statusByUserId", getStatusByUserId());
070 attributes.put("statusByUserName", getStatusByUserName());
071 attributes.put("statusDate", getStatusDate());
072
073 return attributes;
074 }
075
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 pageId = (Long)attributes.get("pageId");
084
085 if (pageId != null) {
086 setPageId(pageId);
087 }
088
089 Long resourcePrimKey = (Long)attributes.get("resourcePrimKey");
090
091 if (resourcePrimKey != null) {
092 setResourcePrimKey(resourcePrimKey);
093 }
094
095 Long groupId = (Long)attributes.get("groupId");
096
097 if (groupId != null) {
098 setGroupId(groupId);
099 }
100
101 Long companyId = (Long)attributes.get("companyId");
102
103 if (companyId != null) {
104 setCompanyId(companyId);
105 }
106
107 Long userId = (Long)attributes.get("userId");
108
109 if (userId != null) {
110 setUserId(userId);
111 }
112
113 String userName = (String)attributes.get("userName");
114
115 if (userName != null) {
116 setUserName(userName);
117 }
118
119 Date createDate = (Date)attributes.get("createDate");
120
121 if (createDate != null) {
122 setCreateDate(createDate);
123 }
124
125 Date modifiedDate = (Date)attributes.get("modifiedDate");
126
127 if (modifiedDate != null) {
128 setModifiedDate(modifiedDate);
129 }
130
131 Long nodeId = (Long)attributes.get("nodeId");
132
133 if (nodeId != null) {
134 setNodeId(nodeId);
135 }
136
137 String title = (String)attributes.get("title");
138
139 if (title != null) {
140 setTitle(title);
141 }
142
143 Double version = (Double)attributes.get("version");
144
145 if (version != null) {
146 setVersion(version);
147 }
148
149 Boolean minorEdit = (Boolean)attributes.get("minorEdit");
150
151 if (minorEdit != null) {
152 setMinorEdit(minorEdit);
153 }
154
155 String content = (String)attributes.get("content");
156
157 if (content != null) {
158 setContent(content);
159 }
160
161 String summary = (String)attributes.get("summary");
162
163 if (summary != null) {
164 setSummary(summary);
165 }
166
167 String format = (String)attributes.get("format");
168
169 if (format != null) {
170 setFormat(format);
171 }
172
173 Boolean head = (Boolean)attributes.get("head");
174
175 if (head != null) {
176 setHead(head);
177 }
178
179 String parentTitle = (String)attributes.get("parentTitle");
180
181 if (parentTitle != null) {
182 setParentTitle(parentTitle);
183 }
184
185 String redirectTitle = (String)attributes.get("redirectTitle");
186
187 if (redirectTitle != null) {
188 setRedirectTitle(redirectTitle);
189 }
190
191 Integer status = (Integer)attributes.get("status");
192
193 if (status != null) {
194 setStatus(status);
195 }
196
197 Long statusByUserId = (Long)attributes.get("statusByUserId");
198
199 if (statusByUserId != null) {
200 setStatusByUserId(statusByUserId);
201 }
202
203 String statusByUserName = (String)attributes.get("statusByUserName");
204
205 if (statusByUserName != null) {
206 setStatusByUserName(statusByUserName);
207 }
208
209 Date statusDate = (Date)attributes.get("statusDate");
210
211 if (statusDate != null) {
212 setStatusDate(statusDate);
213 }
214 }
215
216
221 public long getPrimaryKey() {
222 return _wikiPage.getPrimaryKey();
223 }
224
225
230 public void setPrimaryKey(long primaryKey) {
231 _wikiPage.setPrimaryKey(primaryKey);
232 }
233
234
239 public java.lang.String getUuid() {
240 return _wikiPage.getUuid();
241 }
242
243
248 public void setUuid(java.lang.String uuid) {
249 _wikiPage.setUuid(uuid);
250 }
251
252
257 public long getPageId() {
258 return _wikiPage.getPageId();
259 }
260
261
266 public void setPageId(long pageId) {
267 _wikiPage.setPageId(pageId);
268 }
269
270
275 public long getResourcePrimKey() {
276 return _wikiPage.getResourcePrimKey();
277 }
278
279
284 public void setResourcePrimKey(long resourcePrimKey) {
285 _wikiPage.setResourcePrimKey(resourcePrimKey);
286 }
287
288 public boolean isResourceMain() {
289 return _wikiPage.isResourceMain();
290 }
291
292
297 public long getGroupId() {
298 return _wikiPage.getGroupId();
299 }
300
301
306 public void setGroupId(long groupId) {
307 _wikiPage.setGroupId(groupId);
308 }
309
310
315 public long getCompanyId() {
316 return _wikiPage.getCompanyId();
317 }
318
319
324 public void setCompanyId(long companyId) {
325 _wikiPage.setCompanyId(companyId);
326 }
327
328
333 public long getUserId() {
334 return _wikiPage.getUserId();
335 }
336
337
342 public void setUserId(long userId) {
343 _wikiPage.setUserId(userId);
344 }
345
346
352 public java.lang.String getUserUuid()
353 throws com.liferay.portal.kernel.exception.SystemException {
354 return _wikiPage.getUserUuid();
355 }
356
357
362 public void setUserUuid(java.lang.String userUuid) {
363 _wikiPage.setUserUuid(userUuid);
364 }
365
366
371 public java.lang.String getUserName() {
372 return _wikiPage.getUserName();
373 }
374
375
380 public void setUserName(java.lang.String userName) {
381 _wikiPage.setUserName(userName);
382 }
383
384
389 public java.util.Date getCreateDate() {
390 return _wikiPage.getCreateDate();
391 }
392
393
398 public void setCreateDate(java.util.Date createDate) {
399 _wikiPage.setCreateDate(createDate);
400 }
401
402
407 public java.util.Date getModifiedDate() {
408 return _wikiPage.getModifiedDate();
409 }
410
411
416 public void setModifiedDate(java.util.Date modifiedDate) {
417 _wikiPage.setModifiedDate(modifiedDate);
418 }
419
420
425 public long getNodeId() {
426 return _wikiPage.getNodeId();
427 }
428
429
434 public void setNodeId(long nodeId) {
435 _wikiPage.setNodeId(nodeId);
436 }
437
438
443 public java.lang.String getTitle() {
444 return _wikiPage.getTitle();
445 }
446
447
452 public void setTitle(java.lang.String title) {
453 _wikiPage.setTitle(title);
454 }
455
456
461 public double getVersion() {
462 return _wikiPage.getVersion();
463 }
464
465
470 public void setVersion(double version) {
471 _wikiPage.setVersion(version);
472 }
473
474
479 public boolean getMinorEdit() {
480 return _wikiPage.getMinorEdit();
481 }
482
483
488 public boolean isMinorEdit() {
489 return _wikiPage.isMinorEdit();
490 }
491
492
497 public void setMinorEdit(boolean minorEdit) {
498 _wikiPage.setMinorEdit(minorEdit);
499 }
500
501
506 public java.lang.String getContent() {
507 return _wikiPage.getContent();
508 }
509
510
515 public void setContent(java.lang.String content) {
516 _wikiPage.setContent(content);
517 }
518
519
524 public java.lang.String getSummary() {
525 return _wikiPage.getSummary();
526 }
527
528
533 public void setSummary(java.lang.String summary) {
534 _wikiPage.setSummary(summary);
535 }
536
537
542 public java.lang.String getFormat() {
543 return _wikiPage.getFormat();
544 }
545
546
551 public void setFormat(java.lang.String format) {
552 _wikiPage.setFormat(format);
553 }
554
555
560 public boolean getHead() {
561 return _wikiPage.getHead();
562 }
563
564
569 public boolean isHead() {
570 return _wikiPage.isHead();
571 }
572
573
578 public void setHead(boolean head) {
579 _wikiPage.setHead(head);
580 }
581
582
587 public java.lang.String getParentTitle() {
588 return _wikiPage.getParentTitle();
589 }
590
591
596 public void setParentTitle(java.lang.String parentTitle) {
597 _wikiPage.setParentTitle(parentTitle);
598 }
599
600
605 public java.lang.String getRedirectTitle() {
606 return _wikiPage.getRedirectTitle();
607 }
608
609
614 public void setRedirectTitle(java.lang.String redirectTitle) {
615 _wikiPage.setRedirectTitle(redirectTitle);
616 }
617
618
623 public int getStatus() {
624 return _wikiPage.getStatus();
625 }
626
627
632 public void setStatus(int status) {
633 _wikiPage.setStatus(status);
634 }
635
636
641 public long getStatusByUserId() {
642 return _wikiPage.getStatusByUserId();
643 }
644
645
650 public void setStatusByUserId(long statusByUserId) {
651 _wikiPage.setStatusByUserId(statusByUserId);
652 }
653
654
660 public java.lang.String getStatusByUserUuid()
661 throws com.liferay.portal.kernel.exception.SystemException {
662 return _wikiPage.getStatusByUserUuid();
663 }
664
665
670 public void setStatusByUserUuid(java.lang.String statusByUserUuid) {
671 _wikiPage.setStatusByUserUuid(statusByUserUuid);
672 }
673
674
679 public java.lang.String getStatusByUserName() {
680 return _wikiPage.getStatusByUserName();
681 }
682
683
688 public void setStatusByUserName(java.lang.String statusByUserName) {
689 _wikiPage.setStatusByUserName(statusByUserName);
690 }
691
692
697 public java.util.Date getStatusDate() {
698 return _wikiPage.getStatusDate();
699 }
700
701
706 public void setStatusDate(java.util.Date statusDate) {
707 _wikiPage.setStatusDate(statusDate);
708 }
709
710
713 public boolean getApproved() {
714 return _wikiPage.getApproved();
715 }
716
717
722 public boolean isApproved() {
723 return _wikiPage.isApproved();
724 }
725
726
731 public boolean isDenied() {
732 return _wikiPage.isDenied();
733 }
734
735
740 public boolean isDraft() {
741 return _wikiPage.isDraft();
742 }
743
744
749 public boolean isExpired() {
750 return _wikiPage.isExpired();
751 }
752
753
758 public boolean isInactive() {
759 return _wikiPage.isInactive();
760 }
761
762
767 public boolean isIncomplete() {
768 return _wikiPage.isIncomplete();
769 }
770
771
776 public boolean isPending() {
777 return _wikiPage.isPending();
778 }
779
780
785 public boolean isScheduled() {
786 return _wikiPage.isScheduled();
787 }
788
789 public boolean isNew() {
790 return _wikiPage.isNew();
791 }
792
793 public void setNew(boolean n) {
794 _wikiPage.setNew(n);
795 }
796
797 public boolean isCachedModel() {
798 return _wikiPage.isCachedModel();
799 }
800
801 public void setCachedModel(boolean cachedModel) {
802 _wikiPage.setCachedModel(cachedModel);
803 }
804
805 public boolean isEscapedModel() {
806 return _wikiPage.isEscapedModel();
807 }
808
809 public java.io.Serializable getPrimaryKeyObj() {
810 return _wikiPage.getPrimaryKeyObj();
811 }
812
813 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
814 _wikiPage.setPrimaryKeyObj(primaryKeyObj);
815 }
816
817 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
818 return _wikiPage.getExpandoBridge();
819 }
820
821 public void setExpandoBridgeAttributes(
822 com.liferay.portal.service.ServiceContext serviceContext) {
823 _wikiPage.setExpandoBridgeAttributes(serviceContext);
824 }
825
826 @Override
827 public java.lang.Object clone() {
828 return new WikiPageWrapper((WikiPage)_wikiPage.clone());
829 }
830
831 public int compareTo(com.liferay.portlet.wiki.model.WikiPage wikiPage) {
832 return _wikiPage.compareTo(wikiPage);
833 }
834
835 @Override
836 public int hashCode() {
837 return _wikiPage.hashCode();
838 }
839
840 public com.liferay.portal.model.CacheModel<com.liferay.portlet.wiki.model.WikiPage> toCacheModel() {
841 return _wikiPage.toCacheModel();
842 }
843
844 public com.liferay.portlet.wiki.model.WikiPage toEscapedModel() {
845 return new WikiPageWrapper(_wikiPage.toEscapedModel());
846 }
847
848 public com.liferay.portlet.wiki.model.WikiPage toUnescapedModel() {
849 return new WikiPageWrapper(_wikiPage.toUnescapedModel());
850 }
851
852 @Override
853 public java.lang.String toString() {
854 return _wikiPage.toString();
855 }
856
857 public java.lang.String toXmlString() {
858 return _wikiPage.toXmlString();
859 }
860
861 public void persist()
862 throws com.liferay.portal.kernel.exception.SystemException {
863 _wikiPage.persist();
864 }
865
866 public java.lang.String getAttachmentsDir() {
867 return _wikiPage.getAttachmentsDir();
868 }
869
870 public java.lang.String[] getAttachmentsFiles()
871 throws com.liferay.portal.kernel.exception.PortalException,
872 com.liferay.portal.kernel.exception.SystemException {
873 return _wikiPage.getAttachmentsFiles();
874 }
875
876 public java.util.List<com.liferay.portlet.wiki.model.WikiPage> getChildPages() {
877 return _wikiPage.getChildPages();
878 }
879
880 public com.liferay.portlet.wiki.model.WikiNode getNode() {
881 return _wikiPage.getNode();
882 }
883
884 public com.liferay.portlet.wiki.model.WikiPage getParentPage() {
885 return _wikiPage.getParentPage();
886 }
887
888 public java.util.List<com.liferay.portlet.wiki.model.WikiPage> getParentPages() {
889 return _wikiPage.getParentPages();
890 }
891
892 public com.liferay.portlet.wiki.model.WikiPage getRedirectPage() {
893 return _wikiPage.getRedirectPage();
894 }
895
896 public java.util.List<com.liferay.portlet.wiki.model.WikiPage> getViewableChildPages() {
897 return _wikiPage.getViewableChildPages();
898 }
899
900 public com.liferay.portlet.wiki.model.WikiPage getViewableParentPage() {
901 return _wikiPage.getViewableParentPage();
902 }
903
904 public java.util.List<com.liferay.portlet.wiki.model.WikiPage> getViewableParentPages() {
905 return _wikiPage.getViewableParentPages();
906 }
907
908 public void setAttachmentsDir(java.lang.String attachmentsDir) {
909 _wikiPage.setAttachmentsDir(attachmentsDir);
910 }
911
912 @Override
913 public boolean equals(Object obj) {
914 if (this == obj) {
915 return true;
916 }
917
918 if (!(obj instanceof WikiPageWrapper)) {
919 return false;
920 }
921
922 WikiPageWrapper wikiPageWrapper = (WikiPageWrapper)obj;
923
924 if (Validator.equals(_wikiPage, wikiPageWrapper._wikiPage)) {
925 return true;
926 }
927
928 return false;
929 }
930
931
934 public WikiPage getWrappedWikiPage() {
935 return _wikiPage;
936 }
937
938 public WikiPage getWrappedModel() {
939 return _wikiPage;
940 }
941
942 public void resetOriginalValues() {
943 _wikiPage.resetOriginalValues();
944 }
945
946 private WikiPage _wikiPage;
947 }