001
014
015 package com.liferay.portlet.messageboards.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 MBThreadWrapper implements MBThread, ModelWrapper<MBThread> {
038 public MBThreadWrapper(MBThread mbThread) {
039 _mbThread = mbThread;
040 }
041
042 @Override
043 public Class<?> getModelClass() {
044 return MBThread.class;
045 }
046
047 @Override
048 public String getModelClassName() {
049 return MBThread.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("threadId", getThreadId());
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("categoryId", getCategoryId());
065 attributes.put("rootMessageId", getRootMessageId());
066 attributes.put("rootMessageUserId", getRootMessageUserId());
067 attributes.put("messageCount", getMessageCount());
068 attributes.put("viewCount", getViewCount());
069 attributes.put("lastPostByUserId", getLastPostByUserId());
070 attributes.put("lastPostDate", getLastPostDate());
071 attributes.put("priority", getPriority());
072 attributes.put("question", getQuestion());
073 attributes.put("status", getStatus());
074 attributes.put("statusByUserId", getStatusByUserId());
075 attributes.put("statusByUserName", getStatusByUserName());
076 attributes.put("statusDate", getStatusDate());
077
078 return attributes;
079 }
080
081 @Override
082 public void setModelAttributes(Map<String, Object> attributes) {
083 String uuid = (String)attributes.get("uuid");
084
085 if (uuid != null) {
086 setUuid(uuid);
087 }
088
089 Long threadId = (Long)attributes.get("threadId");
090
091 if (threadId != null) {
092 setThreadId(threadId);
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 categoryId = (Long)attributes.get("categoryId");
132
133 if (categoryId != null) {
134 setCategoryId(categoryId);
135 }
136
137 Long rootMessageId = (Long)attributes.get("rootMessageId");
138
139 if (rootMessageId != null) {
140 setRootMessageId(rootMessageId);
141 }
142
143 Long rootMessageUserId = (Long)attributes.get("rootMessageUserId");
144
145 if (rootMessageUserId != null) {
146 setRootMessageUserId(rootMessageUserId);
147 }
148
149 Integer messageCount = (Integer)attributes.get("messageCount");
150
151 if (messageCount != null) {
152 setMessageCount(messageCount);
153 }
154
155 Integer viewCount = (Integer)attributes.get("viewCount");
156
157 if (viewCount != null) {
158 setViewCount(viewCount);
159 }
160
161 Long lastPostByUserId = (Long)attributes.get("lastPostByUserId");
162
163 if (lastPostByUserId != null) {
164 setLastPostByUserId(lastPostByUserId);
165 }
166
167 Date lastPostDate = (Date)attributes.get("lastPostDate");
168
169 if (lastPostDate != null) {
170 setLastPostDate(lastPostDate);
171 }
172
173 Double priority = (Double)attributes.get("priority");
174
175 if (priority != null) {
176 setPriority(priority);
177 }
178
179 Boolean question = (Boolean)attributes.get("question");
180
181 if (question != null) {
182 setQuestion(question);
183 }
184
185 Integer status = (Integer)attributes.get("status");
186
187 if (status != null) {
188 setStatus(status);
189 }
190
191 Long statusByUserId = (Long)attributes.get("statusByUserId");
192
193 if (statusByUserId != null) {
194 setStatusByUserId(statusByUserId);
195 }
196
197 String statusByUserName = (String)attributes.get("statusByUserName");
198
199 if (statusByUserName != null) {
200 setStatusByUserName(statusByUserName);
201 }
202
203 Date statusDate = (Date)attributes.get("statusDate");
204
205 if (statusDate != null) {
206 setStatusDate(statusDate);
207 }
208 }
209
210
215 @Override
216 public long getPrimaryKey() {
217 return _mbThread.getPrimaryKey();
218 }
219
220
225 @Override
226 public void setPrimaryKey(long primaryKey) {
227 _mbThread.setPrimaryKey(primaryKey);
228 }
229
230
235 @Override
236 public java.lang.String getUuid() {
237 return _mbThread.getUuid();
238 }
239
240
245 @Override
246 public void setUuid(java.lang.String uuid) {
247 _mbThread.setUuid(uuid);
248 }
249
250
255 @Override
256 public long getThreadId() {
257 return _mbThread.getThreadId();
258 }
259
260
265 @Override
266 public void setThreadId(long threadId) {
267 _mbThread.setThreadId(threadId);
268 }
269
270
275 @Override
276 public long getGroupId() {
277 return _mbThread.getGroupId();
278 }
279
280
285 @Override
286 public void setGroupId(long groupId) {
287 _mbThread.setGroupId(groupId);
288 }
289
290
295 @Override
296 public long getCompanyId() {
297 return _mbThread.getCompanyId();
298 }
299
300
305 @Override
306 public void setCompanyId(long companyId) {
307 _mbThread.setCompanyId(companyId);
308 }
309
310
315 @Override
316 public long getUserId() {
317 return _mbThread.getUserId();
318 }
319
320
325 @Override
326 public void setUserId(long userId) {
327 _mbThread.setUserId(userId);
328 }
329
330
336 @Override
337 public java.lang.String getUserUuid()
338 throws com.liferay.portal.kernel.exception.SystemException {
339 return _mbThread.getUserUuid();
340 }
341
342
347 @Override
348 public void setUserUuid(java.lang.String userUuid) {
349 _mbThread.setUserUuid(userUuid);
350 }
351
352
357 @Override
358 public java.lang.String getUserName() {
359 return _mbThread.getUserName();
360 }
361
362
367 @Override
368 public void setUserName(java.lang.String userName) {
369 _mbThread.setUserName(userName);
370 }
371
372
377 @Override
378 public java.util.Date getCreateDate() {
379 return _mbThread.getCreateDate();
380 }
381
382
387 @Override
388 public void setCreateDate(java.util.Date createDate) {
389 _mbThread.setCreateDate(createDate);
390 }
391
392
397 @Override
398 public java.util.Date getModifiedDate() {
399 return _mbThread.getModifiedDate();
400 }
401
402
407 @Override
408 public void setModifiedDate(java.util.Date modifiedDate) {
409 _mbThread.setModifiedDate(modifiedDate);
410 }
411
412
417 @Override
418 public long getCategoryId() {
419 return _mbThread.getCategoryId();
420 }
421
422
427 @Override
428 public void setCategoryId(long categoryId) {
429 _mbThread.setCategoryId(categoryId);
430 }
431
432
437 @Override
438 public long getRootMessageId() {
439 return _mbThread.getRootMessageId();
440 }
441
442
447 @Override
448 public void setRootMessageId(long rootMessageId) {
449 _mbThread.setRootMessageId(rootMessageId);
450 }
451
452
457 @Override
458 public long getRootMessageUserId() {
459 return _mbThread.getRootMessageUserId();
460 }
461
462
467 @Override
468 public void setRootMessageUserId(long rootMessageUserId) {
469 _mbThread.setRootMessageUserId(rootMessageUserId);
470 }
471
472
478 @Override
479 public java.lang.String getRootMessageUserUuid()
480 throws com.liferay.portal.kernel.exception.SystemException {
481 return _mbThread.getRootMessageUserUuid();
482 }
483
484
489 @Override
490 public void setRootMessageUserUuid(java.lang.String rootMessageUserUuid) {
491 _mbThread.setRootMessageUserUuid(rootMessageUserUuid);
492 }
493
494
499 @Override
500 public int getMessageCount() {
501 return _mbThread.getMessageCount();
502 }
503
504
509 @Override
510 public void setMessageCount(int messageCount) {
511 _mbThread.setMessageCount(messageCount);
512 }
513
514
519 @Override
520 public int getViewCount() {
521 return _mbThread.getViewCount();
522 }
523
524
529 @Override
530 public void setViewCount(int viewCount) {
531 _mbThread.setViewCount(viewCount);
532 }
533
534
539 @Override
540 public long getLastPostByUserId() {
541 return _mbThread.getLastPostByUserId();
542 }
543
544
549 @Override
550 public void setLastPostByUserId(long lastPostByUserId) {
551 _mbThread.setLastPostByUserId(lastPostByUserId);
552 }
553
554
560 @Override
561 public java.lang.String getLastPostByUserUuid()
562 throws com.liferay.portal.kernel.exception.SystemException {
563 return _mbThread.getLastPostByUserUuid();
564 }
565
566
571 @Override
572 public void setLastPostByUserUuid(java.lang.String lastPostByUserUuid) {
573 _mbThread.setLastPostByUserUuid(lastPostByUserUuid);
574 }
575
576
581 @Override
582 public java.util.Date getLastPostDate() {
583 return _mbThread.getLastPostDate();
584 }
585
586
591 @Override
592 public void setLastPostDate(java.util.Date lastPostDate) {
593 _mbThread.setLastPostDate(lastPostDate);
594 }
595
596
601 @Override
602 public double getPriority() {
603 return _mbThread.getPriority();
604 }
605
606
611 @Override
612 public void setPriority(double priority) {
613 _mbThread.setPriority(priority);
614 }
615
616
621 @Override
622 public boolean getQuestion() {
623 return _mbThread.getQuestion();
624 }
625
626
631 @Override
632 public boolean isQuestion() {
633 return _mbThread.isQuestion();
634 }
635
636
641 @Override
642 public void setQuestion(boolean question) {
643 _mbThread.setQuestion(question);
644 }
645
646
651 @Override
652 public int getStatus() {
653 return _mbThread.getStatus();
654 }
655
656
661 @Override
662 public void setStatus(int status) {
663 _mbThread.setStatus(status);
664 }
665
666
671 @Override
672 public long getStatusByUserId() {
673 return _mbThread.getStatusByUserId();
674 }
675
676
681 @Override
682 public void setStatusByUserId(long statusByUserId) {
683 _mbThread.setStatusByUserId(statusByUserId);
684 }
685
686
692 @Override
693 public java.lang.String getStatusByUserUuid()
694 throws com.liferay.portal.kernel.exception.SystemException {
695 return _mbThread.getStatusByUserUuid();
696 }
697
698
703 @Override
704 public void setStatusByUserUuid(java.lang.String statusByUserUuid) {
705 _mbThread.setStatusByUserUuid(statusByUserUuid);
706 }
707
708
713 @Override
714 public java.lang.String getStatusByUserName() {
715 return _mbThread.getStatusByUserName();
716 }
717
718
723 @Override
724 public void setStatusByUserName(java.lang.String statusByUserName) {
725 _mbThread.setStatusByUserName(statusByUserName);
726 }
727
728
733 @Override
734 public java.util.Date getStatusDate() {
735 return _mbThread.getStatusDate();
736 }
737
738
743 @Override
744 public void setStatusDate(java.util.Date statusDate) {
745 _mbThread.setStatusDate(statusDate);
746 }
747
748
754 @Override
755 public com.liferay.portlet.trash.model.TrashEntry getTrashEntry()
756 throws com.liferay.portal.kernel.exception.PortalException,
757 com.liferay.portal.kernel.exception.SystemException {
758 return _mbThread.getTrashEntry();
759 }
760
761
766 @Override
767 public long getTrashEntryClassPK() {
768 return _mbThread.getTrashEntryClassPK();
769 }
770
771
776 @Override
777 public com.liferay.portal.kernel.trash.TrashHandler getTrashHandler() {
778 return _mbThread.getTrashHandler();
779 }
780
781
786 @Override
787 public boolean isInTrash() {
788 return _mbThread.isInTrash();
789 }
790
791
797 @Override
798 public boolean isInTrashContainer() {
799 return _mbThread.isInTrashContainer();
800 }
801
802
805 @Override
806 public boolean getApproved() {
807 return _mbThread.getApproved();
808 }
809
810
815 @Override
816 public boolean isApproved() {
817 return _mbThread.isApproved();
818 }
819
820
825 @Override
826 public boolean isDenied() {
827 return _mbThread.isDenied();
828 }
829
830
835 @Override
836 public boolean isDraft() {
837 return _mbThread.isDraft();
838 }
839
840
845 @Override
846 public boolean isExpired() {
847 return _mbThread.isExpired();
848 }
849
850
855 @Override
856 public boolean isInactive() {
857 return _mbThread.isInactive();
858 }
859
860
865 @Override
866 public boolean isIncomplete() {
867 return _mbThread.isIncomplete();
868 }
869
870
875 @Override
876 public boolean isPending() {
877 return _mbThread.isPending();
878 }
879
880
885 @Override
886 public boolean isScheduled() {
887 return _mbThread.isScheduled();
888 }
889
890
895 @Override
896 public long getContainerModelId() {
897 return _mbThread.getContainerModelId();
898 }
899
900
905 @Override
906 public void setContainerModelId(long containerModelId) {
907 _mbThread.setContainerModelId(containerModelId);
908 }
909
910
915 @Override
916 public java.lang.String getContainerModelName() {
917 return _mbThread.getContainerModelName();
918 }
919
920
925 @Override
926 public long getParentContainerModelId() {
927 return _mbThread.getParentContainerModelId();
928 }
929
930
935 @Override
936 public void setParentContainerModelId(long parentContainerModelId) {
937 _mbThread.setParentContainerModelId(parentContainerModelId);
938 }
939
940 @Override
941 public boolean isNew() {
942 return _mbThread.isNew();
943 }
944
945 @Override
946 public void setNew(boolean n) {
947 _mbThread.setNew(n);
948 }
949
950 @Override
951 public boolean isCachedModel() {
952 return _mbThread.isCachedModel();
953 }
954
955 @Override
956 public void setCachedModel(boolean cachedModel) {
957 _mbThread.setCachedModel(cachedModel);
958 }
959
960 @Override
961 public boolean isEscapedModel() {
962 return _mbThread.isEscapedModel();
963 }
964
965 @Override
966 public java.io.Serializable getPrimaryKeyObj() {
967 return _mbThread.getPrimaryKeyObj();
968 }
969
970 @Override
971 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
972 _mbThread.setPrimaryKeyObj(primaryKeyObj);
973 }
974
975 @Override
976 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
977 return _mbThread.getExpandoBridge();
978 }
979
980 @Override
981 public void setExpandoBridgeAttributes(
982 com.liferay.portal.model.BaseModel<?> baseModel) {
983 _mbThread.setExpandoBridgeAttributes(baseModel);
984 }
985
986 @Override
987 public void setExpandoBridgeAttributes(
988 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
989 _mbThread.setExpandoBridgeAttributes(expandoBridge);
990 }
991
992 @Override
993 public void setExpandoBridgeAttributes(
994 com.liferay.portal.service.ServiceContext serviceContext) {
995 _mbThread.setExpandoBridgeAttributes(serviceContext);
996 }
997
998 @Override
999 public java.lang.Object clone() {
1000 return new MBThreadWrapper((MBThread)_mbThread.clone());
1001 }
1002
1003 @Override
1004 public int compareTo(
1005 com.liferay.portlet.messageboards.model.MBThread mbThread) {
1006 return _mbThread.compareTo(mbThread);
1007 }
1008
1009 @Override
1010 public int hashCode() {
1011 return _mbThread.hashCode();
1012 }
1013
1014 @Override
1015 public com.liferay.portal.model.CacheModel<com.liferay.portlet.messageboards.model.MBThread> toCacheModel() {
1016 return _mbThread.toCacheModel();
1017 }
1018
1019 @Override
1020 public com.liferay.portlet.messageboards.model.MBThread toEscapedModel() {
1021 return new MBThreadWrapper(_mbThread.toEscapedModel());
1022 }
1023
1024 @Override
1025 public com.liferay.portlet.messageboards.model.MBThread toUnescapedModel() {
1026 return new MBThreadWrapper(_mbThread.toUnescapedModel());
1027 }
1028
1029 @Override
1030 public java.lang.String toString() {
1031 return _mbThread.toString();
1032 }
1033
1034 @Override
1035 public java.lang.String toXmlString() {
1036 return _mbThread.toXmlString();
1037 }
1038
1039 @Override
1040 public void persist()
1041 throws com.liferay.portal.kernel.exception.SystemException {
1042 _mbThread.persist();
1043 }
1044
1045 @Override
1046 public com.liferay.portal.kernel.repository.model.Folder addAttachmentsFolder()
1047 throws com.liferay.portal.kernel.exception.PortalException,
1048 com.liferay.portal.kernel.exception.SystemException {
1049 return _mbThread.addAttachmentsFolder();
1050 }
1051
1052 @Override
1053 public long getAttachmentsFolderId()
1054 throws com.liferay.portal.kernel.exception.SystemException {
1055 return _mbThread.getAttachmentsFolderId();
1056 }
1057
1058 @Override
1059 public com.liferay.portlet.messageboards.model.MBCategory getCategory()
1060 throws com.liferay.portal.kernel.exception.PortalException,
1061 com.liferay.portal.kernel.exception.SystemException {
1062 return _mbThread.getCategory();
1063 }
1064
1065 @Override
1066 public com.liferay.portal.model.Lock getLock() {
1067 return _mbThread.getLock();
1068 }
1069
1070 @Override
1071 public long[] getParticipantUserIds()
1072 throws com.liferay.portal.kernel.exception.SystemException {
1073 return _mbThread.getParticipantUserIds();
1074 }
1075
1076 @Override
1077 public boolean hasLock(long userId) {
1078 return _mbThread.hasLock(userId);
1079 }
1080
1081 @Override
1082 public boolean isInTrashExplicitly()
1083 throws com.liferay.portal.kernel.exception.SystemException {
1084 return _mbThread.isInTrashExplicitly();
1085 }
1086
1087 @Override
1088 public boolean isLocked() {
1089 return _mbThread.isLocked();
1090 }
1091
1092 @Override
1093 public boolean equals(Object obj) {
1094 if (this == obj) {
1095 return true;
1096 }
1097
1098 if (!(obj instanceof MBThreadWrapper)) {
1099 return false;
1100 }
1101
1102 MBThreadWrapper mbThreadWrapper = (MBThreadWrapper)obj;
1103
1104 if (Validator.equals(_mbThread, mbThreadWrapper._mbThread)) {
1105 return true;
1106 }
1107
1108 return false;
1109 }
1110
1111 @Override
1112 public StagedModelType getStagedModelType() {
1113 return _mbThread.getStagedModelType();
1114 }
1115
1116
1119 public MBThread getWrappedMBThread() {
1120 return _mbThread;
1121 }
1122
1123 @Override
1124 public MBThread getWrappedModel() {
1125 return _mbThread;
1126 }
1127
1128 @Override
1129 public void resetOriginalValues() {
1130 _mbThread.resetOriginalValues();
1131 }
1132
1133 private MBThread _mbThread;
1134 }