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 MBMessageWrapper implements MBMessage, ModelWrapper<MBMessage> {
038 public MBMessageWrapper(MBMessage mbMessage) {
039 _mbMessage = mbMessage;
040 }
041
042 @Override
043 public Class<?> getModelClass() {
044 return MBMessage.class;
045 }
046
047 @Override
048 public String getModelClassName() {
049 return MBMessage.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("messageId", getMessageId());
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("classNameId", getClassNameId());
065 attributes.put("classPK", getClassPK());
066 attributes.put("categoryId", getCategoryId());
067 attributes.put("threadId", getThreadId());
068 attributes.put("rootMessageId", getRootMessageId());
069 attributes.put("parentMessageId", getParentMessageId());
070 attributes.put("subject", getSubject());
071 attributes.put("body", getBody());
072 attributes.put("format", getFormat());
073 attributes.put("anonymous", getAnonymous());
074 attributes.put("priority", getPriority());
075 attributes.put("allowPingbacks", getAllowPingbacks());
076 attributes.put("answer", getAnswer());
077 attributes.put("status", getStatus());
078 attributes.put("statusByUserId", getStatusByUserId());
079 attributes.put("statusByUserName", getStatusByUserName());
080 attributes.put("statusDate", getStatusDate());
081
082 return attributes;
083 }
084
085 @Override
086 public void setModelAttributes(Map<String, Object> attributes) {
087 String uuid = (String)attributes.get("uuid");
088
089 if (uuid != null) {
090 setUuid(uuid);
091 }
092
093 Long messageId = (Long)attributes.get("messageId");
094
095 if (messageId != null) {
096 setMessageId(messageId);
097 }
098
099 Long groupId = (Long)attributes.get("groupId");
100
101 if (groupId != null) {
102 setGroupId(groupId);
103 }
104
105 Long companyId = (Long)attributes.get("companyId");
106
107 if (companyId != null) {
108 setCompanyId(companyId);
109 }
110
111 Long userId = (Long)attributes.get("userId");
112
113 if (userId != null) {
114 setUserId(userId);
115 }
116
117 String userName = (String)attributes.get("userName");
118
119 if (userName != null) {
120 setUserName(userName);
121 }
122
123 Date createDate = (Date)attributes.get("createDate");
124
125 if (createDate != null) {
126 setCreateDate(createDate);
127 }
128
129 Date modifiedDate = (Date)attributes.get("modifiedDate");
130
131 if (modifiedDate != null) {
132 setModifiedDate(modifiedDate);
133 }
134
135 Long classNameId = (Long)attributes.get("classNameId");
136
137 if (classNameId != null) {
138 setClassNameId(classNameId);
139 }
140
141 Long classPK = (Long)attributes.get("classPK");
142
143 if (classPK != null) {
144 setClassPK(classPK);
145 }
146
147 Long categoryId = (Long)attributes.get("categoryId");
148
149 if (categoryId != null) {
150 setCategoryId(categoryId);
151 }
152
153 Long threadId = (Long)attributes.get("threadId");
154
155 if (threadId != null) {
156 setThreadId(threadId);
157 }
158
159 Long rootMessageId = (Long)attributes.get("rootMessageId");
160
161 if (rootMessageId != null) {
162 setRootMessageId(rootMessageId);
163 }
164
165 Long parentMessageId = (Long)attributes.get("parentMessageId");
166
167 if (parentMessageId != null) {
168 setParentMessageId(parentMessageId);
169 }
170
171 String subject = (String)attributes.get("subject");
172
173 if (subject != null) {
174 setSubject(subject);
175 }
176
177 String body = (String)attributes.get("body");
178
179 if (body != null) {
180 setBody(body);
181 }
182
183 String format = (String)attributes.get("format");
184
185 if (format != null) {
186 setFormat(format);
187 }
188
189 Boolean anonymous = (Boolean)attributes.get("anonymous");
190
191 if (anonymous != null) {
192 setAnonymous(anonymous);
193 }
194
195 Double priority = (Double)attributes.get("priority");
196
197 if (priority != null) {
198 setPriority(priority);
199 }
200
201 Boolean allowPingbacks = (Boolean)attributes.get("allowPingbacks");
202
203 if (allowPingbacks != null) {
204 setAllowPingbacks(allowPingbacks);
205 }
206
207 Boolean answer = (Boolean)attributes.get("answer");
208
209 if (answer != null) {
210 setAnswer(answer);
211 }
212
213 Integer status = (Integer)attributes.get("status");
214
215 if (status != null) {
216 setStatus(status);
217 }
218
219 Long statusByUserId = (Long)attributes.get("statusByUserId");
220
221 if (statusByUserId != null) {
222 setStatusByUserId(statusByUserId);
223 }
224
225 String statusByUserName = (String)attributes.get("statusByUserName");
226
227 if (statusByUserName != null) {
228 setStatusByUserName(statusByUserName);
229 }
230
231 Date statusDate = (Date)attributes.get("statusDate");
232
233 if (statusDate != null) {
234 setStatusDate(statusDate);
235 }
236 }
237
238
243 @Override
244 public long getPrimaryKey() {
245 return _mbMessage.getPrimaryKey();
246 }
247
248
253 @Override
254 public void setPrimaryKey(long primaryKey) {
255 _mbMessage.setPrimaryKey(primaryKey);
256 }
257
258
263 @Override
264 public java.lang.String getUuid() {
265 return _mbMessage.getUuid();
266 }
267
268
273 @Override
274 public void setUuid(java.lang.String uuid) {
275 _mbMessage.setUuid(uuid);
276 }
277
278
283 @Override
284 public long getMessageId() {
285 return _mbMessage.getMessageId();
286 }
287
288
293 @Override
294 public void setMessageId(long messageId) {
295 _mbMessage.setMessageId(messageId);
296 }
297
298
303 @Override
304 public long getGroupId() {
305 return _mbMessage.getGroupId();
306 }
307
308
313 @Override
314 public void setGroupId(long groupId) {
315 _mbMessage.setGroupId(groupId);
316 }
317
318
323 @Override
324 public long getCompanyId() {
325 return _mbMessage.getCompanyId();
326 }
327
328
333 @Override
334 public void setCompanyId(long companyId) {
335 _mbMessage.setCompanyId(companyId);
336 }
337
338
343 @Override
344 public long getUserId() {
345 return _mbMessage.getUserId();
346 }
347
348
353 @Override
354 public void setUserId(long userId) {
355 _mbMessage.setUserId(userId);
356 }
357
358
364 @Override
365 public java.lang.String getUserUuid()
366 throws com.liferay.portal.kernel.exception.SystemException {
367 return _mbMessage.getUserUuid();
368 }
369
370
375 @Override
376 public void setUserUuid(java.lang.String userUuid) {
377 _mbMessage.setUserUuid(userUuid);
378 }
379
380
385 @Override
386 public java.lang.String getUserName() {
387 return _mbMessage.getUserName();
388 }
389
390
395 @Override
396 public void setUserName(java.lang.String userName) {
397 _mbMessage.setUserName(userName);
398 }
399
400
405 @Override
406 public java.util.Date getCreateDate() {
407 return _mbMessage.getCreateDate();
408 }
409
410
415 @Override
416 public void setCreateDate(java.util.Date createDate) {
417 _mbMessage.setCreateDate(createDate);
418 }
419
420
425 @Override
426 public java.util.Date getModifiedDate() {
427 return _mbMessage.getModifiedDate();
428 }
429
430
435 @Override
436 public void setModifiedDate(java.util.Date modifiedDate) {
437 _mbMessage.setModifiedDate(modifiedDate);
438 }
439
440
445 @Override
446 public java.lang.String getClassName() {
447 return _mbMessage.getClassName();
448 }
449
450 @Override
451 public void setClassName(java.lang.String className) {
452 _mbMessage.setClassName(className);
453 }
454
455
460 @Override
461 public long getClassNameId() {
462 return _mbMessage.getClassNameId();
463 }
464
465
470 @Override
471 public void setClassNameId(long classNameId) {
472 _mbMessage.setClassNameId(classNameId);
473 }
474
475
480 @Override
481 public long getClassPK() {
482 return _mbMessage.getClassPK();
483 }
484
485
490 @Override
491 public void setClassPK(long classPK) {
492 _mbMessage.setClassPK(classPK);
493 }
494
495
500 @Override
501 public long getCategoryId() {
502 return _mbMessage.getCategoryId();
503 }
504
505
510 @Override
511 public void setCategoryId(long categoryId) {
512 _mbMessage.setCategoryId(categoryId);
513 }
514
515
520 @Override
521 public long getThreadId() {
522 return _mbMessage.getThreadId();
523 }
524
525
530 @Override
531 public void setThreadId(long threadId) {
532 _mbMessage.setThreadId(threadId);
533 }
534
535
540 @Override
541 public long getRootMessageId() {
542 return _mbMessage.getRootMessageId();
543 }
544
545
550 @Override
551 public void setRootMessageId(long rootMessageId) {
552 _mbMessage.setRootMessageId(rootMessageId);
553 }
554
555
560 @Override
561 public long getParentMessageId() {
562 return _mbMessage.getParentMessageId();
563 }
564
565
570 @Override
571 public void setParentMessageId(long parentMessageId) {
572 _mbMessage.setParentMessageId(parentMessageId);
573 }
574
575
580 @Override
581 public java.lang.String getSubject() {
582 return _mbMessage.getSubject();
583 }
584
585
590 @Override
591 public void setSubject(java.lang.String subject) {
592 _mbMessage.setSubject(subject);
593 }
594
595
600 @Override
601 public java.lang.String getBody() {
602 return _mbMessage.getBody();
603 }
604
605
610 @Override
611 public void setBody(java.lang.String body) {
612 _mbMessage.setBody(body);
613 }
614
615
620 @Override
621 public java.lang.String getFormat() {
622 return _mbMessage.getFormat();
623 }
624
625
630 @Override
631 public void setFormat(java.lang.String format) {
632 _mbMessage.setFormat(format);
633 }
634
635
640 @Override
641 public boolean getAnonymous() {
642 return _mbMessage.getAnonymous();
643 }
644
645
650 @Override
651 public boolean isAnonymous() {
652 return _mbMessage.isAnonymous();
653 }
654
655
660 @Override
661 public void setAnonymous(boolean anonymous) {
662 _mbMessage.setAnonymous(anonymous);
663 }
664
665
670 @Override
671 public double getPriority() {
672 return _mbMessage.getPriority();
673 }
674
675
680 @Override
681 public void setPriority(double priority) {
682 _mbMessage.setPriority(priority);
683 }
684
685
690 @Override
691 public boolean getAllowPingbacks() {
692 return _mbMessage.getAllowPingbacks();
693 }
694
695
700 @Override
701 public boolean isAllowPingbacks() {
702 return _mbMessage.isAllowPingbacks();
703 }
704
705
710 @Override
711 public void setAllowPingbacks(boolean allowPingbacks) {
712 _mbMessage.setAllowPingbacks(allowPingbacks);
713 }
714
715
720 @Override
721 public boolean getAnswer() {
722 return _mbMessage.getAnswer();
723 }
724
725
730 @Override
731 public boolean isAnswer() {
732 return _mbMessage.isAnswer();
733 }
734
735
740 @Override
741 public void setAnswer(boolean answer) {
742 _mbMessage.setAnswer(answer);
743 }
744
745
750 @Override
751 public int getStatus() {
752 return _mbMessage.getStatus();
753 }
754
755
760 @Override
761 public void setStatus(int status) {
762 _mbMessage.setStatus(status);
763 }
764
765
770 @Override
771 public long getStatusByUserId() {
772 return _mbMessage.getStatusByUserId();
773 }
774
775
780 @Override
781 public void setStatusByUserId(long statusByUserId) {
782 _mbMessage.setStatusByUserId(statusByUserId);
783 }
784
785
791 @Override
792 public java.lang.String getStatusByUserUuid()
793 throws com.liferay.portal.kernel.exception.SystemException {
794 return _mbMessage.getStatusByUserUuid();
795 }
796
797
802 @Override
803 public void setStatusByUserUuid(java.lang.String statusByUserUuid) {
804 _mbMessage.setStatusByUserUuid(statusByUserUuid);
805 }
806
807
812 @Override
813 public java.lang.String getStatusByUserName() {
814 return _mbMessage.getStatusByUserName();
815 }
816
817
822 @Override
823 public void setStatusByUserName(java.lang.String statusByUserName) {
824 _mbMessage.setStatusByUserName(statusByUserName);
825 }
826
827
832 @Override
833 public java.util.Date getStatusDate() {
834 return _mbMessage.getStatusDate();
835 }
836
837
842 @Override
843 public void setStatusDate(java.util.Date statusDate) {
844 _mbMessage.setStatusDate(statusDate);
845 }
846
847
853 @Override
854 public com.liferay.portlet.trash.model.TrashEntry getTrashEntry()
855 throws com.liferay.portal.kernel.exception.PortalException,
856 com.liferay.portal.kernel.exception.SystemException {
857 return _mbMessage.getTrashEntry();
858 }
859
860
865 @Override
866 public long getTrashEntryClassPK() {
867 return _mbMessage.getTrashEntryClassPK();
868 }
869
870
875 @Override
876 public com.liferay.portal.kernel.trash.TrashHandler getTrashHandler() {
877 return _mbMessage.getTrashHandler();
878 }
879
880
885 @Override
886 public boolean isInTrash() {
887 return _mbMessage.isInTrash();
888 }
889
890
896 @Override
897 public boolean isInTrashContainer() {
898 return _mbMessage.isInTrashContainer();
899 }
900
901
904 @Override
905 public boolean getApproved() {
906 return _mbMessage.getApproved();
907 }
908
909
914 @Override
915 public boolean isApproved() {
916 return _mbMessage.isApproved();
917 }
918
919
924 @Override
925 public boolean isDenied() {
926 return _mbMessage.isDenied();
927 }
928
929
934 @Override
935 public boolean isDraft() {
936 return _mbMessage.isDraft();
937 }
938
939
944 @Override
945 public boolean isExpired() {
946 return _mbMessage.isExpired();
947 }
948
949
954 @Override
955 public boolean isInactive() {
956 return _mbMessage.isInactive();
957 }
958
959
964 @Override
965 public boolean isIncomplete() {
966 return _mbMessage.isIncomplete();
967 }
968
969
974 @Override
975 public boolean isPending() {
976 return _mbMessage.isPending();
977 }
978
979
984 @Override
985 public boolean isScheduled() {
986 return _mbMessage.isScheduled();
987 }
988
989 @Override
990 public boolean isNew() {
991 return _mbMessage.isNew();
992 }
993
994 @Override
995 public void setNew(boolean n) {
996 _mbMessage.setNew(n);
997 }
998
999 @Override
1000 public boolean isCachedModel() {
1001 return _mbMessage.isCachedModel();
1002 }
1003
1004 @Override
1005 public void setCachedModel(boolean cachedModel) {
1006 _mbMessage.setCachedModel(cachedModel);
1007 }
1008
1009 @Override
1010 public boolean isEscapedModel() {
1011 return _mbMessage.isEscapedModel();
1012 }
1013
1014 @Override
1015 public java.io.Serializable getPrimaryKeyObj() {
1016 return _mbMessage.getPrimaryKeyObj();
1017 }
1018
1019 @Override
1020 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
1021 _mbMessage.setPrimaryKeyObj(primaryKeyObj);
1022 }
1023
1024 @Override
1025 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
1026 return _mbMessage.getExpandoBridge();
1027 }
1028
1029 @Override
1030 public void setExpandoBridgeAttributes(
1031 com.liferay.portal.model.BaseModel<?> baseModel) {
1032 _mbMessage.setExpandoBridgeAttributes(baseModel);
1033 }
1034
1035 @Override
1036 public void setExpandoBridgeAttributes(
1037 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
1038 _mbMessage.setExpandoBridgeAttributes(expandoBridge);
1039 }
1040
1041 @Override
1042 public void setExpandoBridgeAttributes(
1043 com.liferay.portal.service.ServiceContext serviceContext) {
1044 _mbMessage.setExpandoBridgeAttributes(serviceContext);
1045 }
1046
1047 @Override
1048 public java.lang.Object clone() {
1049 return new MBMessageWrapper((MBMessage)_mbMessage.clone());
1050 }
1051
1052 @Override
1053 public int compareTo(
1054 com.liferay.portlet.messageboards.model.MBMessage mbMessage) {
1055 return _mbMessage.compareTo(mbMessage);
1056 }
1057
1058 @Override
1059 public int hashCode() {
1060 return _mbMessage.hashCode();
1061 }
1062
1063 @Override
1064 public com.liferay.portal.model.CacheModel<com.liferay.portlet.messageboards.model.MBMessage> toCacheModel() {
1065 return _mbMessage.toCacheModel();
1066 }
1067
1068 @Override
1069 public com.liferay.portlet.messageboards.model.MBMessage toEscapedModel() {
1070 return new MBMessageWrapper(_mbMessage.toEscapedModel());
1071 }
1072
1073 @Override
1074 public com.liferay.portlet.messageboards.model.MBMessage toUnescapedModel() {
1075 return new MBMessageWrapper(_mbMessage.toUnescapedModel());
1076 }
1077
1078 @Override
1079 public java.lang.String toString() {
1080 return _mbMessage.toString();
1081 }
1082
1083 @Override
1084 public java.lang.String toXmlString() {
1085 return _mbMessage.toXmlString();
1086 }
1087
1088 @Override
1089 public void persist()
1090 throws com.liferay.portal.kernel.exception.SystemException {
1091 _mbMessage.persist();
1092 }
1093
1094 @Override
1095 public com.liferay.portal.kernel.repository.model.Folder addAttachmentsFolder()
1096 throws com.liferay.portal.kernel.exception.PortalException,
1097 com.liferay.portal.kernel.exception.SystemException {
1098 return _mbMessage.addAttachmentsFolder();
1099 }
1100
1101 @Override
1102 public java.lang.String[] getAssetTagNames()
1103 throws com.liferay.portal.kernel.exception.SystemException {
1104 return _mbMessage.getAssetTagNames();
1105 }
1106
1107 @Override
1108 public java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getAttachmentsFileEntries()
1109 throws com.liferay.portal.kernel.exception.PortalException,
1110 com.liferay.portal.kernel.exception.SystemException {
1111 return _mbMessage.getAttachmentsFileEntries();
1112 }
1113
1114 @Override
1115 public java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getAttachmentsFileEntries(
1116 int start, int end)
1117 throws com.liferay.portal.kernel.exception.PortalException,
1118 com.liferay.portal.kernel.exception.SystemException {
1119 return _mbMessage.getAttachmentsFileEntries(start, end);
1120 }
1121
1122 @Override
1123 public int getAttachmentsFileEntriesCount()
1124 throws com.liferay.portal.kernel.exception.PortalException,
1125 com.liferay.portal.kernel.exception.SystemException {
1126 return _mbMessage.getAttachmentsFileEntriesCount();
1127 }
1128
1129 @Override
1130 public long getAttachmentsFolderId()
1131 throws com.liferay.portal.kernel.exception.PortalException,
1132 com.liferay.portal.kernel.exception.SystemException {
1133 return _mbMessage.getAttachmentsFolderId();
1134 }
1135
1136 @Override
1137 public java.lang.String getBody(boolean translate) {
1138 return _mbMessage.getBody(translate);
1139 }
1140
1141 @Override
1142 public com.liferay.portlet.messageboards.model.MBCategory getCategory()
1143 throws com.liferay.portal.kernel.exception.PortalException,
1144 com.liferay.portal.kernel.exception.SystemException {
1145 return _mbMessage.getCategory();
1146 }
1147
1148 @Override
1149 public java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getDeletedAttachmentsFileEntries()
1150 throws com.liferay.portal.kernel.exception.PortalException,
1151 com.liferay.portal.kernel.exception.SystemException {
1152 return _mbMessage.getDeletedAttachmentsFileEntries();
1153 }
1154
1155 @Override
1156 public java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getDeletedAttachmentsFileEntries(
1157 int start, int end)
1158 throws com.liferay.portal.kernel.exception.PortalException,
1159 com.liferay.portal.kernel.exception.SystemException {
1160 return _mbMessage.getDeletedAttachmentsFileEntries(start, end);
1161 }
1162
1163 @Override
1164 public int getDeletedAttachmentsFileEntriesCount()
1165 throws com.liferay.portal.kernel.exception.PortalException,
1166 com.liferay.portal.kernel.exception.SystemException {
1167 return _mbMessage.getDeletedAttachmentsFileEntriesCount();
1168 }
1169
1170 @Override
1171 public com.liferay.portlet.messageboards.model.MBThread getThread()
1172 throws com.liferay.portal.kernel.exception.PortalException,
1173 com.liferay.portal.kernel.exception.SystemException {
1174 return _mbMessage.getThread();
1175 }
1176
1177 @Override
1178 public long getThreadAttachmentsFolderId()
1179 throws com.liferay.portal.kernel.exception.PortalException,
1180 com.liferay.portal.kernel.exception.SystemException {
1181 return _mbMessage.getThreadAttachmentsFolderId();
1182 }
1183
1184 @Override
1185 public java.lang.String getWorkflowClassName() {
1186 return _mbMessage.getWorkflowClassName();
1187 }
1188
1189 @Override
1190 public boolean isDiscussion() {
1191 return _mbMessage.isDiscussion();
1192 }
1193
1194 @Override
1195 public boolean isFormatBBCode() {
1196 return _mbMessage.isFormatBBCode();
1197 }
1198
1199 @Override
1200 public boolean isReply() {
1201 return _mbMessage.isReply();
1202 }
1203
1204 @Override
1205 public boolean isRoot() {
1206 return _mbMessage.isRoot();
1207 }
1208
1209 @Override
1210 public void setAttachmentsFolderId(long attachmentsFolderId) {
1211 _mbMessage.setAttachmentsFolderId(attachmentsFolderId);
1212 }
1213
1214 @Override
1215 public boolean equals(Object obj) {
1216 if (this == obj) {
1217 return true;
1218 }
1219
1220 if (!(obj instanceof MBMessageWrapper)) {
1221 return false;
1222 }
1223
1224 MBMessageWrapper mbMessageWrapper = (MBMessageWrapper)obj;
1225
1226 if (Validator.equals(_mbMessage, mbMessageWrapper._mbMessage)) {
1227 return true;
1228 }
1229
1230 return false;
1231 }
1232
1233 @Override
1234 public StagedModelType getStagedModelType() {
1235 return _mbMessage.getStagedModelType();
1236 }
1237
1238
1241 public MBMessage getWrappedMBMessage() {
1242 return _mbMessage;
1243 }
1244
1245 @Override
1246 public MBMessage getWrappedModel() {
1247 return _mbMessage;
1248 }
1249
1250 @Override
1251 public void resetOriginalValues() {
1252 _mbMessage.resetOriginalValues();
1253 }
1254
1255 private MBMessage _mbMessage;
1256 }