001    /**
002     * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.messageboards.model;
016    
017    import com.liferay.portal.model.ModelWrapper;
018    
019    import java.util.Date;
020    import java.util.HashMap;
021    import java.util.Map;
022    
023    /**
024     * <p>
025     * This class is a wrapper for {@link MBThread}.
026     * </p>
027     *
028     * @author    Brian Wing Shun Chan
029     * @see       MBThread
030     * @generated
031     */
032    public class MBThreadWrapper implements MBThread, ModelWrapper<MBThread> {
033            public MBThreadWrapper(MBThread mbThread) {
034                    _mbThread = mbThread;
035            }
036    
037            public Class<?> getModelClass() {
038                    return MBThread.class;
039            }
040    
041            public String getModelClassName() {
042                    return MBThread.class.getName();
043            }
044    
045            public Map<String, Object> getModelAttributes() {
046                    Map<String, Object> attributes = new HashMap<String, Object>();
047    
048                    attributes.put("threadId", getThreadId());
049                    attributes.put("groupId", getGroupId());
050                    attributes.put("companyId", getCompanyId());
051                    attributes.put("categoryId", getCategoryId());
052                    attributes.put("rootMessageId", getRootMessageId());
053                    attributes.put("rootMessageUserId", getRootMessageUserId());
054                    attributes.put("messageCount", getMessageCount());
055                    attributes.put("viewCount", getViewCount());
056                    attributes.put("lastPostByUserId", getLastPostByUserId());
057                    attributes.put("lastPostDate", getLastPostDate());
058                    attributes.put("priority", getPriority());
059                    attributes.put("question", getQuestion());
060                    attributes.put("status", getStatus());
061                    attributes.put("statusByUserId", getStatusByUserId());
062                    attributes.put("statusByUserName", getStatusByUserName());
063                    attributes.put("statusDate", getStatusDate());
064    
065                    return attributes;
066            }
067    
068            public void setModelAttributes(Map<String, Object> attributes) {
069                    Long threadId = (Long)attributes.get("threadId");
070    
071                    if (threadId != null) {
072                            setThreadId(threadId);
073                    }
074    
075                    Long groupId = (Long)attributes.get("groupId");
076    
077                    if (groupId != null) {
078                            setGroupId(groupId);
079                    }
080    
081                    Long companyId = (Long)attributes.get("companyId");
082    
083                    if (companyId != null) {
084                            setCompanyId(companyId);
085                    }
086    
087                    Long categoryId = (Long)attributes.get("categoryId");
088    
089                    if (categoryId != null) {
090                            setCategoryId(categoryId);
091                    }
092    
093                    Long rootMessageId = (Long)attributes.get("rootMessageId");
094    
095                    if (rootMessageId != null) {
096                            setRootMessageId(rootMessageId);
097                    }
098    
099                    Long rootMessageUserId = (Long)attributes.get("rootMessageUserId");
100    
101                    if (rootMessageUserId != null) {
102                            setRootMessageUserId(rootMessageUserId);
103                    }
104    
105                    Integer messageCount = (Integer)attributes.get("messageCount");
106    
107                    if (messageCount != null) {
108                            setMessageCount(messageCount);
109                    }
110    
111                    Integer viewCount = (Integer)attributes.get("viewCount");
112    
113                    if (viewCount != null) {
114                            setViewCount(viewCount);
115                    }
116    
117                    Long lastPostByUserId = (Long)attributes.get("lastPostByUserId");
118    
119                    if (lastPostByUserId != null) {
120                            setLastPostByUserId(lastPostByUserId);
121                    }
122    
123                    Date lastPostDate = (Date)attributes.get("lastPostDate");
124    
125                    if (lastPostDate != null) {
126                            setLastPostDate(lastPostDate);
127                    }
128    
129                    Double priority = (Double)attributes.get("priority");
130    
131                    if (priority != null) {
132                            setPriority(priority);
133                    }
134    
135                    Boolean question = (Boolean)attributes.get("question");
136    
137                    if (question != null) {
138                            setQuestion(question);
139                    }
140    
141                    Integer status = (Integer)attributes.get("status");
142    
143                    if (status != null) {
144                            setStatus(status);
145                    }
146    
147                    Long statusByUserId = (Long)attributes.get("statusByUserId");
148    
149                    if (statusByUserId != null) {
150                            setStatusByUserId(statusByUserId);
151                    }
152    
153                    String statusByUserName = (String)attributes.get("statusByUserName");
154    
155                    if (statusByUserName != null) {
156                            setStatusByUserName(statusByUserName);
157                    }
158    
159                    Date statusDate = (Date)attributes.get("statusDate");
160    
161                    if (statusDate != null) {
162                            setStatusDate(statusDate);
163                    }
164            }
165    
166            /**
167            * Returns the primary key of this message boards thread.
168            *
169            * @return the primary key of this message boards thread
170            */
171            public long getPrimaryKey() {
172                    return _mbThread.getPrimaryKey();
173            }
174    
175            /**
176            * Sets the primary key of this message boards thread.
177            *
178            * @param primaryKey the primary key of this message boards thread
179            */
180            public void setPrimaryKey(long primaryKey) {
181                    _mbThread.setPrimaryKey(primaryKey);
182            }
183    
184            /**
185            * Returns the thread ID of this message boards thread.
186            *
187            * @return the thread ID of this message boards thread
188            */
189            public long getThreadId() {
190                    return _mbThread.getThreadId();
191            }
192    
193            /**
194            * Sets the thread ID of this message boards thread.
195            *
196            * @param threadId the thread ID of this message boards thread
197            */
198            public void setThreadId(long threadId) {
199                    _mbThread.setThreadId(threadId);
200            }
201    
202            /**
203            * Returns the group ID of this message boards thread.
204            *
205            * @return the group ID of this message boards thread
206            */
207            public long getGroupId() {
208                    return _mbThread.getGroupId();
209            }
210    
211            /**
212            * Sets the group ID of this message boards thread.
213            *
214            * @param groupId the group ID of this message boards thread
215            */
216            public void setGroupId(long groupId) {
217                    _mbThread.setGroupId(groupId);
218            }
219    
220            /**
221            * Returns the company ID of this message boards thread.
222            *
223            * @return the company ID of this message boards thread
224            */
225            public long getCompanyId() {
226                    return _mbThread.getCompanyId();
227            }
228    
229            /**
230            * Sets the company ID of this message boards thread.
231            *
232            * @param companyId the company ID of this message boards thread
233            */
234            public void setCompanyId(long companyId) {
235                    _mbThread.setCompanyId(companyId);
236            }
237    
238            /**
239            * Returns the category ID of this message boards thread.
240            *
241            * @return the category ID of this message boards thread
242            */
243            public long getCategoryId() {
244                    return _mbThread.getCategoryId();
245            }
246    
247            /**
248            * Sets the category ID of this message boards thread.
249            *
250            * @param categoryId the category ID of this message boards thread
251            */
252            public void setCategoryId(long categoryId) {
253                    _mbThread.setCategoryId(categoryId);
254            }
255    
256            /**
257            * Returns the root message ID of this message boards thread.
258            *
259            * @return the root message ID of this message boards thread
260            */
261            public long getRootMessageId() {
262                    return _mbThread.getRootMessageId();
263            }
264    
265            /**
266            * Sets the root message ID of this message boards thread.
267            *
268            * @param rootMessageId the root message ID of this message boards thread
269            */
270            public void setRootMessageId(long rootMessageId) {
271                    _mbThread.setRootMessageId(rootMessageId);
272            }
273    
274            /**
275            * Returns the root message user ID of this message boards thread.
276            *
277            * @return the root message user ID of this message boards thread
278            */
279            public long getRootMessageUserId() {
280                    return _mbThread.getRootMessageUserId();
281            }
282    
283            /**
284            * Sets the root message user ID of this message boards thread.
285            *
286            * @param rootMessageUserId the root message user ID of this message boards thread
287            */
288            public void setRootMessageUserId(long rootMessageUserId) {
289                    _mbThread.setRootMessageUserId(rootMessageUserId);
290            }
291    
292            /**
293            * Returns the root message user uuid of this message boards thread.
294            *
295            * @return the root message user uuid of this message boards thread
296            * @throws SystemException if a system exception occurred
297            */
298            public java.lang.String getRootMessageUserUuid()
299                    throws com.liferay.portal.kernel.exception.SystemException {
300                    return _mbThread.getRootMessageUserUuid();
301            }
302    
303            /**
304            * Sets the root message user uuid of this message boards thread.
305            *
306            * @param rootMessageUserUuid the root message user uuid of this message boards thread
307            */
308            public void setRootMessageUserUuid(java.lang.String rootMessageUserUuid) {
309                    _mbThread.setRootMessageUserUuid(rootMessageUserUuid);
310            }
311    
312            /**
313            * Returns the message count of this message boards thread.
314            *
315            * @return the message count of this message boards thread
316            */
317            public int getMessageCount() {
318                    return _mbThread.getMessageCount();
319            }
320    
321            /**
322            * Sets the message count of this message boards thread.
323            *
324            * @param messageCount the message count of this message boards thread
325            */
326            public void setMessageCount(int messageCount) {
327                    _mbThread.setMessageCount(messageCount);
328            }
329    
330            /**
331            * Returns the view count of this message boards thread.
332            *
333            * @return the view count of this message boards thread
334            */
335            public int getViewCount() {
336                    return _mbThread.getViewCount();
337            }
338    
339            /**
340            * Sets the view count of this message boards thread.
341            *
342            * @param viewCount the view count of this message boards thread
343            */
344            public void setViewCount(int viewCount) {
345                    _mbThread.setViewCount(viewCount);
346            }
347    
348            /**
349            * Returns the last post by user ID of this message boards thread.
350            *
351            * @return the last post by user ID of this message boards thread
352            */
353            public long getLastPostByUserId() {
354                    return _mbThread.getLastPostByUserId();
355            }
356    
357            /**
358            * Sets the last post by user ID of this message boards thread.
359            *
360            * @param lastPostByUserId the last post by user ID of this message boards thread
361            */
362            public void setLastPostByUserId(long lastPostByUserId) {
363                    _mbThread.setLastPostByUserId(lastPostByUserId);
364            }
365    
366            /**
367            * Returns the last post by user uuid of this message boards thread.
368            *
369            * @return the last post by user uuid of this message boards thread
370            * @throws SystemException if a system exception occurred
371            */
372            public java.lang.String getLastPostByUserUuid()
373                    throws com.liferay.portal.kernel.exception.SystemException {
374                    return _mbThread.getLastPostByUserUuid();
375            }
376    
377            /**
378            * Sets the last post by user uuid of this message boards thread.
379            *
380            * @param lastPostByUserUuid the last post by user uuid of this message boards thread
381            */
382            public void setLastPostByUserUuid(java.lang.String lastPostByUserUuid) {
383                    _mbThread.setLastPostByUserUuid(lastPostByUserUuid);
384            }
385    
386            /**
387            * Returns the last post date of this message boards thread.
388            *
389            * @return the last post date of this message boards thread
390            */
391            public java.util.Date getLastPostDate() {
392                    return _mbThread.getLastPostDate();
393            }
394    
395            /**
396            * Sets the last post date of this message boards thread.
397            *
398            * @param lastPostDate the last post date of this message boards thread
399            */
400            public void setLastPostDate(java.util.Date lastPostDate) {
401                    _mbThread.setLastPostDate(lastPostDate);
402            }
403    
404            /**
405            * Returns the priority of this message boards thread.
406            *
407            * @return the priority of this message boards thread
408            */
409            public double getPriority() {
410                    return _mbThread.getPriority();
411            }
412    
413            /**
414            * Sets the priority of this message boards thread.
415            *
416            * @param priority the priority of this message boards thread
417            */
418            public void setPriority(double priority) {
419                    _mbThread.setPriority(priority);
420            }
421    
422            /**
423            * Returns the question of this message boards thread.
424            *
425            * @return the question of this message boards thread
426            */
427            public boolean getQuestion() {
428                    return _mbThread.getQuestion();
429            }
430    
431            /**
432            * Returns <code>true</code> if this message boards thread is question.
433            *
434            * @return <code>true</code> if this message boards thread is question; <code>false</code> otherwise
435            */
436            public boolean isQuestion() {
437                    return _mbThread.isQuestion();
438            }
439    
440            /**
441            * Sets whether this message boards thread is question.
442            *
443            * @param question the question of this message boards thread
444            */
445            public void setQuestion(boolean question) {
446                    _mbThread.setQuestion(question);
447            }
448    
449            /**
450            * Returns the status of this message boards thread.
451            *
452            * @return the status of this message boards thread
453            */
454            public int getStatus() {
455                    return _mbThread.getStatus();
456            }
457    
458            /**
459            * Sets the status of this message boards thread.
460            *
461            * @param status the status of this message boards thread
462            */
463            public void setStatus(int status) {
464                    _mbThread.setStatus(status);
465            }
466    
467            /**
468            * Returns the status by user ID of this message boards thread.
469            *
470            * @return the status by user ID of this message boards thread
471            */
472            public long getStatusByUserId() {
473                    return _mbThread.getStatusByUserId();
474            }
475    
476            /**
477            * Sets the status by user ID of this message boards thread.
478            *
479            * @param statusByUserId the status by user ID of this message boards thread
480            */
481            public void setStatusByUserId(long statusByUserId) {
482                    _mbThread.setStatusByUserId(statusByUserId);
483            }
484    
485            /**
486            * Returns the status by user uuid of this message boards thread.
487            *
488            * @return the status by user uuid of this message boards thread
489            * @throws SystemException if a system exception occurred
490            */
491            public java.lang.String getStatusByUserUuid()
492                    throws com.liferay.portal.kernel.exception.SystemException {
493                    return _mbThread.getStatusByUserUuid();
494            }
495    
496            /**
497            * Sets the status by user uuid of this message boards thread.
498            *
499            * @param statusByUserUuid the status by user uuid of this message boards thread
500            */
501            public void setStatusByUserUuid(java.lang.String statusByUserUuid) {
502                    _mbThread.setStatusByUserUuid(statusByUserUuid);
503            }
504    
505            /**
506            * Returns the status by user name of this message boards thread.
507            *
508            * @return the status by user name of this message boards thread
509            */
510            public java.lang.String getStatusByUserName() {
511                    return _mbThread.getStatusByUserName();
512            }
513    
514            /**
515            * Sets the status by user name of this message boards thread.
516            *
517            * @param statusByUserName the status by user name of this message boards thread
518            */
519            public void setStatusByUserName(java.lang.String statusByUserName) {
520                    _mbThread.setStatusByUserName(statusByUserName);
521            }
522    
523            /**
524            * Returns the status date of this message boards thread.
525            *
526            * @return the status date of this message boards thread
527            */
528            public java.util.Date getStatusDate() {
529                    return _mbThread.getStatusDate();
530            }
531    
532            /**
533            * Sets the status date of this message boards thread.
534            *
535            * @param statusDate the status date of this message boards thread
536            */
537            public void setStatusDate(java.util.Date statusDate) {
538                    _mbThread.setStatusDate(statusDate);
539            }
540    
541            /**
542            * @deprecated Renamed to {@link #isApproved()}
543            */
544            public boolean getApproved() {
545                    return _mbThread.getApproved();
546            }
547    
548            /**
549            * Returns <code>true</code> if this message boards thread is approved.
550            *
551            * @return <code>true</code> if this message boards thread is approved; <code>false</code> otherwise
552            */
553            public boolean isApproved() {
554                    return _mbThread.isApproved();
555            }
556    
557            /**
558            * Returns <code>true</code> if this message boards thread is denied.
559            *
560            * @return <code>true</code> if this message boards thread is denied; <code>false</code> otherwise
561            */
562            public boolean isDenied() {
563                    return _mbThread.isDenied();
564            }
565    
566            /**
567            * Returns <code>true</code> if this message boards thread is a draft.
568            *
569            * @return <code>true</code> if this message boards thread is a draft; <code>false</code> otherwise
570            */
571            public boolean isDraft() {
572                    return _mbThread.isDraft();
573            }
574    
575            /**
576            * Returns <code>true</code> if this message boards thread is expired.
577            *
578            * @return <code>true</code> if this message boards thread is expired; <code>false</code> otherwise
579            */
580            public boolean isExpired() {
581                    return _mbThread.isExpired();
582            }
583    
584            /**
585            * Returns <code>true</code> if this message boards thread is inactive.
586            *
587            * @return <code>true</code> if this message boards thread is inactive; <code>false</code> otherwise
588            */
589            public boolean isInactive() {
590                    return _mbThread.isInactive();
591            }
592    
593            /**
594            * Returns <code>true</code> if this message boards thread is incomplete.
595            *
596            * @return <code>true</code> if this message boards thread is incomplete; <code>false</code> otherwise
597            */
598            public boolean isIncomplete() {
599                    return _mbThread.isIncomplete();
600            }
601    
602            /**
603            * Returns <code>true</code> if this message boards thread is in the Recycle Bin.
604            *
605            * @return <code>true</code> if this message boards thread is in the Recycle Bin; <code>false</code> otherwise
606            */
607            public boolean isInTrash() {
608                    return _mbThread.isInTrash();
609            }
610    
611            /**
612            * Returns <code>true</code> if this message boards thread is pending.
613            *
614            * @return <code>true</code> if this message boards thread is pending; <code>false</code> otherwise
615            */
616            public boolean isPending() {
617                    return _mbThread.isPending();
618            }
619    
620            /**
621            * Returns <code>true</code> if this message boards thread is scheduled.
622            *
623            * @return <code>true</code> if this message boards thread is scheduled; <code>false</code> otherwise
624            */
625            public boolean isScheduled() {
626                    return _mbThread.isScheduled();
627            }
628    
629            public boolean isNew() {
630                    return _mbThread.isNew();
631            }
632    
633            public void setNew(boolean n) {
634                    _mbThread.setNew(n);
635            }
636    
637            public boolean isCachedModel() {
638                    return _mbThread.isCachedModel();
639            }
640    
641            public void setCachedModel(boolean cachedModel) {
642                    _mbThread.setCachedModel(cachedModel);
643            }
644    
645            public boolean isEscapedModel() {
646                    return _mbThread.isEscapedModel();
647            }
648    
649            public java.io.Serializable getPrimaryKeyObj() {
650                    return _mbThread.getPrimaryKeyObj();
651            }
652    
653            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
654                    _mbThread.setPrimaryKeyObj(primaryKeyObj);
655            }
656    
657            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
658                    return _mbThread.getExpandoBridge();
659            }
660    
661            public void setExpandoBridgeAttributes(
662                    com.liferay.portal.service.ServiceContext serviceContext) {
663                    _mbThread.setExpandoBridgeAttributes(serviceContext);
664            }
665    
666            @Override
667            public java.lang.Object clone() {
668                    return new MBThreadWrapper((MBThread)_mbThread.clone());
669            }
670    
671            public int compareTo(
672                    com.liferay.portlet.messageboards.model.MBThread mbThread) {
673                    return _mbThread.compareTo(mbThread);
674            }
675    
676            @Override
677            public int hashCode() {
678                    return _mbThread.hashCode();
679            }
680    
681            public com.liferay.portal.model.CacheModel<com.liferay.portlet.messageboards.model.MBThread> toCacheModel() {
682                    return _mbThread.toCacheModel();
683            }
684    
685            public com.liferay.portlet.messageboards.model.MBThread toEscapedModel() {
686                    return new MBThreadWrapper(_mbThread.toEscapedModel());
687            }
688    
689            @Override
690            public java.lang.String toString() {
691                    return _mbThread.toString();
692            }
693    
694            public java.lang.String toXmlString() {
695                    return _mbThread.toXmlString();
696            }
697    
698            public void persist()
699                    throws com.liferay.portal.kernel.exception.SystemException {
700                    _mbThread.persist();
701            }
702    
703            public java.lang.String getAttachmentsDir() {
704                    return _mbThread.getAttachmentsDir();
705            }
706    
707            public com.liferay.portal.model.Lock getLock() {
708                    return _mbThread.getLock();
709            }
710    
711            public boolean hasLock(long userId) {
712                    return _mbThread.hasLock(userId);
713            }
714    
715            public boolean isLocked() {
716                    return _mbThread.isLocked();
717            }
718    
719            /**
720             * @deprecated Renamed to {@link #getWrappedModel}
721             */
722            public MBThread getWrappedMBThread() {
723                    return _mbThread;
724            }
725    
726            public MBThread getWrappedModel() {
727                    return _mbThread;
728            }
729    
730            public void resetOriginalValues() {
731                    _mbThread.resetOriginalValues();
732            }
733    
734            private MBThread _mbThread;
735    }