001
014
015 package com.liferay.portlet.messageboards.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 MBThreadWrapper implements MBThread, ModelWrapper<MBThread> {
034 public MBThreadWrapper(MBThread mbThread) {
035 _mbThread = mbThread;
036 }
037
038 public Class<?> getModelClass() {
039 return MBThread.class;
040 }
041
042 public String getModelClassName() {
043 return MBThread.class.getName();
044 }
045
046 public Map<String, Object> getModelAttributes() {
047 Map<String, Object> attributes = new HashMap<String, Object>();
048
049 attributes.put("threadId", getThreadId());
050 attributes.put("groupId", getGroupId());
051 attributes.put("companyId", getCompanyId());
052 attributes.put("categoryId", getCategoryId());
053 attributes.put("rootMessageId", getRootMessageId());
054 attributes.put("rootMessageUserId", getRootMessageUserId());
055 attributes.put("messageCount", getMessageCount());
056 attributes.put("viewCount", getViewCount());
057 attributes.put("lastPostByUserId", getLastPostByUserId());
058 attributes.put("lastPostDate", getLastPostDate());
059 attributes.put("priority", getPriority());
060 attributes.put("question", getQuestion());
061 attributes.put("status", getStatus());
062 attributes.put("statusByUserId", getStatusByUserId());
063 attributes.put("statusByUserName", getStatusByUserName());
064 attributes.put("statusDate", getStatusDate());
065
066 return attributes;
067 }
068
069 public void setModelAttributes(Map<String, Object> attributes) {
070 Long threadId = (Long)attributes.get("threadId");
071
072 if (threadId != null) {
073 setThreadId(threadId);
074 }
075
076 Long groupId = (Long)attributes.get("groupId");
077
078 if (groupId != null) {
079 setGroupId(groupId);
080 }
081
082 Long companyId = (Long)attributes.get("companyId");
083
084 if (companyId != null) {
085 setCompanyId(companyId);
086 }
087
088 Long categoryId = (Long)attributes.get("categoryId");
089
090 if (categoryId != null) {
091 setCategoryId(categoryId);
092 }
093
094 Long rootMessageId = (Long)attributes.get("rootMessageId");
095
096 if (rootMessageId != null) {
097 setRootMessageId(rootMessageId);
098 }
099
100 Long rootMessageUserId = (Long)attributes.get("rootMessageUserId");
101
102 if (rootMessageUserId != null) {
103 setRootMessageUserId(rootMessageUserId);
104 }
105
106 Integer messageCount = (Integer)attributes.get("messageCount");
107
108 if (messageCount != null) {
109 setMessageCount(messageCount);
110 }
111
112 Integer viewCount = (Integer)attributes.get("viewCount");
113
114 if (viewCount != null) {
115 setViewCount(viewCount);
116 }
117
118 Long lastPostByUserId = (Long)attributes.get("lastPostByUserId");
119
120 if (lastPostByUserId != null) {
121 setLastPostByUserId(lastPostByUserId);
122 }
123
124 Date lastPostDate = (Date)attributes.get("lastPostDate");
125
126 if (lastPostDate != null) {
127 setLastPostDate(lastPostDate);
128 }
129
130 Double priority = (Double)attributes.get("priority");
131
132 if (priority != null) {
133 setPriority(priority);
134 }
135
136 Boolean question = (Boolean)attributes.get("question");
137
138 if (question != null) {
139 setQuestion(question);
140 }
141
142 Integer status = (Integer)attributes.get("status");
143
144 if (status != null) {
145 setStatus(status);
146 }
147
148 Long statusByUserId = (Long)attributes.get("statusByUserId");
149
150 if (statusByUserId != null) {
151 setStatusByUserId(statusByUserId);
152 }
153
154 String statusByUserName = (String)attributes.get("statusByUserName");
155
156 if (statusByUserName != null) {
157 setStatusByUserName(statusByUserName);
158 }
159
160 Date statusDate = (Date)attributes.get("statusDate");
161
162 if (statusDate != null) {
163 setStatusDate(statusDate);
164 }
165 }
166
167
172 public long getPrimaryKey() {
173 return _mbThread.getPrimaryKey();
174 }
175
176
181 public void setPrimaryKey(long primaryKey) {
182 _mbThread.setPrimaryKey(primaryKey);
183 }
184
185
190 public long getThreadId() {
191 return _mbThread.getThreadId();
192 }
193
194
199 public void setThreadId(long threadId) {
200 _mbThread.setThreadId(threadId);
201 }
202
203
208 public long getGroupId() {
209 return _mbThread.getGroupId();
210 }
211
212
217 public void setGroupId(long groupId) {
218 _mbThread.setGroupId(groupId);
219 }
220
221
226 public long getCompanyId() {
227 return _mbThread.getCompanyId();
228 }
229
230
235 public void setCompanyId(long companyId) {
236 _mbThread.setCompanyId(companyId);
237 }
238
239
244 public long getCategoryId() {
245 return _mbThread.getCategoryId();
246 }
247
248
253 public void setCategoryId(long categoryId) {
254 _mbThread.setCategoryId(categoryId);
255 }
256
257
262 public long getRootMessageId() {
263 return _mbThread.getRootMessageId();
264 }
265
266
271 public void setRootMessageId(long rootMessageId) {
272 _mbThread.setRootMessageId(rootMessageId);
273 }
274
275
280 public long getRootMessageUserId() {
281 return _mbThread.getRootMessageUserId();
282 }
283
284
289 public void setRootMessageUserId(long rootMessageUserId) {
290 _mbThread.setRootMessageUserId(rootMessageUserId);
291 }
292
293
299 public java.lang.String getRootMessageUserUuid()
300 throws com.liferay.portal.kernel.exception.SystemException {
301 return _mbThread.getRootMessageUserUuid();
302 }
303
304
309 public void setRootMessageUserUuid(java.lang.String rootMessageUserUuid) {
310 _mbThread.setRootMessageUserUuid(rootMessageUserUuid);
311 }
312
313
318 public int getMessageCount() {
319 return _mbThread.getMessageCount();
320 }
321
322
327 public void setMessageCount(int messageCount) {
328 _mbThread.setMessageCount(messageCount);
329 }
330
331
336 public int getViewCount() {
337 return _mbThread.getViewCount();
338 }
339
340
345 public void setViewCount(int viewCount) {
346 _mbThread.setViewCount(viewCount);
347 }
348
349
354 public long getLastPostByUserId() {
355 return _mbThread.getLastPostByUserId();
356 }
357
358
363 public void setLastPostByUserId(long lastPostByUserId) {
364 _mbThread.setLastPostByUserId(lastPostByUserId);
365 }
366
367
373 public java.lang.String getLastPostByUserUuid()
374 throws com.liferay.portal.kernel.exception.SystemException {
375 return _mbThread.getLastPostByUserUuid();
376 }
377
378
383 public void setLastPostByUserUuid(java.lang.String lastPostByUserUuid) {
384 _mbThread.setLastPostByUserUuid(lastPostByUserUuid);
385 }
386
387
392 public java.util.Date getLastPostDate() {
393 return _mbThread.getLastPostDate();
394 }
395
396
401 public void setLastPostDate(java.util.Date lastPostDate) {
402 _mbThread.setLastPostDate(lastPostDate);
403 }
404
405
410 public double getPriority() {
411 return _mbThread.getPriority();
412 }
413
414
419 public void setPriority(double priority) {
420 _mbThread.setPriority(priority);
421 }
422
423
428 public boolean getQuestion() {
429 return _mbThread.getQuestion();
430 }
431
432
437 public boolean isQuestion() {
438 return _mbThread.isQuestion();
439 }
440
441
446 public void setQuestion(boolean question) {
447 _mbThread.setQuestion(question);
448 }
449
450
455 public int getStatus() {
456 return _mbThread.getStatus();
457 }
458
459
464 public void setStatus(int status) {
465 _mbThread.setStatus(status);
466 }
467
468
473 public long getStatusByUserId() {
474 return _mbThread.getStatusByUserId();
475 }
476
477
482 public void setStatusByUserId(long statusByUserId) {
483 _mbThread.setStatusByUserId(statusByUserId);
484 }
485
486
492 public java.lang.String getStatusByUserUuid()
493 throws com.liferay.portal.kernel.exception.SystemException {
494 return _mbThread.getStatusByUserUuid();
495 }
496
497
502 public void setStatusByUserUuid(java.lang.String statusByUserUuid) {
503 _mbThread.setStatusByUserUuid(statusByUserUuid);
504 }
505
506
511 public java.lang.String getStatusByUserName() {
512 return _mbThread.getStatusByUserName();
513 }
514
515
520 public void setStatusByUserName(java.lang.String statusByUserName) {
521 _mbThread.setStatusByUserName(statusByUserName);
522 }
523
524
529 public java.util.Date getStatusDate() {
530 return _mbThread.getStatusDate();
531 }
532
533
538 public void setStatusDate(java.util.Date statusDate) {
539 _mbThread.setStatusDate(statusDate);
540 }
541
542
545 public boolean getApproved() {
546 return _mbThread.getApproved();
547 }
548
549
554 public boolean isApproved() {
555 return _mbThread.isApproved();
556 }
557
558
563 public boolean isDenied() {
564 return _mbThread.isDenied();
565 }
566
567
572 public boolean isDraft() {
573 return _mbThread.isDraft();
574 }
575
576
581 public boolean isExpired() {
582 return _mbThread.isExpired();
583 }
584
585
590 public boolean isInactive() {
591 return _mbThread.isInactive();
592 }
593
594
599 public boolean isIncomplete() {
600 return _mbThread.isIncomplete();
601 }
602
603
608 public boolean isPending() {
609 return _mbThread.isPending();
610 }
611
612
617 public boolean isScheduled() {
618 return _mbThread.isScheduled();
619 }
620
621 public boolean isNew() {
622 return _mbThread.isNew();
623 }
624
625 public void setNew(boolean n) {
626 _mbThread.setNew(n);
627 }
628
629 public boolean isCachedModel() {
630 return _mbThread.isCachedModel();
631 }
632
633 public void setCachedModel(boolean cachedModel) {
634 _mbThread.setCachedModel(cachedModel);
635 }
636
637 public boolean isEscapedModel() {
638 return _mbThread.isEscapedModel();
639 }
640
641 public java.io.Serializable getPrimaryKeyObj() {
642 return _mbThread.getPrimaryKeyObj();
643 }
644
645 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
646 _mbThread.setPrimaryKeyObj(primaryKeyObj);
647 }
648
649 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
650 return _mbThread.getExpandoBridge();
651 }
652
653 public void setExpandoBridgeAttributes(
654 com.liferay.portal.service.ServiceContext serviceContext) {
655 _mbThread.setExpandoBridgeAttributes(serviceContext);
656 }
657
658 @Override
659 public java.lang.Object clone() {
660 return new MBThreadWrapper((MBThread)_mbThread.clone());
661 }
662
663 public int compareTo(
664 com.liferay.portlet.messageboards.model.MBThread mbThread) {
665 return _mbThread.compareTo(mbThread);
666 }
667
668 @Override
669 public int hashCode() {
670 return _mbThread.hashCode();
671 }
672
673 public com.liferay.portal.model.CacheModel<com.liferay.portlet.messageboards.model.MBThread> toCacheModel() {
674 return _mbThread.toCacheModel();
675 }
676
677 public com.liferay.portlet.messageboards.model.MBThread toEscapedModel() {
678 return new MBThreadWrapper(_mbThread.toEscapedModel());
679 }
680
681 public com.liferay.portlet.messageboards.model.MBThread toUnescapedModel() {
682 return new MBThreadWrapper(_mbThread.toUnescapedModel());
683 }
684
685 @Override
686 public java.lang.String toString() {
687 return _mbThread.toString();
688 }
689
690 public java.lang.String toXmlString() {
691 return _mbThread.toXmlString();
692 }
693
694 public void persist()
695 throws com.liferay.portal.kernel.exception.SystemException {
696 _mbThread.persist();
697 }
698
699 public java.lang.String getAttachmentsDir() {
700 return _mbThread.getAttachmentsDir();
701 }
702
703 public com.liferay.portal.model.Lock getLock() {
704 return _mbThread.getLock();
705 }
706
707 public boolean hasLock(long userId) {
708 return _mbThread.hasLock(userId);
709 }
710
711 public boolean isLocked() {
712 return _mbThread.isLocked();
713 }
714
715 @Override
716 public boolean equals(Object obj) {
717 if (this == obj) {
718 return true;
719 }
720
721 if (!(obj instanceof MBThreadWrapper)) {
722 return false;
723 }
724
725 MBThreadWrapper mbThreadWrapper = (MBThreadWrapper)obj;
726
727 if (Validator.equals(_mbThread, mbThreadWrapper._mbThread)) {
728 return true;
729 }
730
731 return false;
732 }
733
734
737 public MBThread getWrappedMBThread() {
738 return _mbThread;
739 }
740
741 public MBThread getWrappedModel() {
742 return _mbThread;
743 }
744
745 public void resetOriginalValues() {
746 _mbThread.resetOriginalValues();
747 }
748
749 private MBThread _mbThread;
750 }