001    /**
002     * Copyright (c) 2000-2013 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.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    /**
025     * <p>
026     * This class is a wrapper for {@link MBThread}.
027     * </p>
028     *
029     * @author    Brian Wing Shun Chan
030     * @see       MBThread
031     * @generated
032     */
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            /**
168            * Returns the primary key of this message boards thread.
169            *
170            * @return the primary key of this message boards thread
171            */
172            public long getPrimaryKey() {
173                    return _mbThread.getPrimaryKey();
174            }
175    
176            /**
177            * Sets the primary key of this message boards thread.
178            *
179            * @param primaryKey the primary key of this message boards thread
180            */
181            public void setPrimaryKey(long primaryKey) {
182                    _mbThread.setPrimaryKey(primaryKey);
183            }
184    
185            /**
186            * Returns the thread ID of this message boards thread.
187            *
188            * @return the thread ID of this message boards thread
189            */
190            public long getThreadId() {
191                    return _mbThread.getThreadId();
192            }
193    
194            /**
195            * Sets the thread ID of this message boards thread.
196            *
197            * @param threadId the thread ID of this message boards thread
198            */
199            public void setThreadId(long threadId) {
200                    _mbThread.setThreadId(threadId);
201            }
202    
203            /**
204            * Returns the group ID of this message boards thread.
205            *
206            * @return the group ID of this message boards thread
207            */
208            public long getGroupId() {
209                    return _mbThread.getGroupId();
210            }
211    
212            /**
213            * Sets the group ID of this message boards thread.
214            *
215            * @param groupId the group ID of this message boards thread
216            */
217            public void setGroupId(long groupId) {
218                    _mbThread.setGroupId(groupId);
219            }
220    
221            /**
222            * Returns the company ID of this message boards thread.
223            *
224            * @return the company ID of this message boards thread
225            */
226            public long getCompanyId() {
227                    return _mbThread.getCompanyId();
228            }
229    
230            /**
231            * Sets the company ID of this message boards thread.
232            *
233            * @param companyId the company ID of this message boards thread
234            */
235            public void setCompanyId(long companyId) {
236                    _mbThread.setCompanyId(companyId);
237            }
238    
239            /**
240            * Returns the category ID of this message boards thread.
241            *
242            * @return the category ID of this message boards thread
243            */
244            public long getCategoryId() {
245                    return _mbThread.getCategoryId();
246            }
247    
248            /**
249            * Sets the category ID of this message boards thread.
250            *
251            * @param categoryId the category ID of this message boards thread
252            */
253            public void setCategoryId(long categoryId) {
254                    _mbThread.setCategoryId(categoryId);
255            }
256    
257            /**
258            * Returns the root message ID of this message boards thread.
259            *
260            * @return the root message ID of this message boards thread
261            */
262            public long getRootMessageId() {
263                    return _mbThread.getRootMessageId();
264            }
265    
266            /**
267            * Sets the root message ID of this message boards thread.
268            *
269            * @param rootMessageId the root message ID of this message boards thread
270            */
271            public void setRootMessageId(long rootMessageId) {
272                    _mbThread.setRootMessageId(rootMessageId);
273            }
274    
275            /**
276            * Returns the root message user ID of this message boards thread.
277            *
278            * @return the root message user ID of this message boards thread
279            */
280            public long getRootMessageUserId() {
281                    return _mbThread.getRootMessageUserId();
282            }
283    
284            /**
285            * Sets the root message user ID of this message boards thread.
286            *
287            * @param rootMessageUserId the root message user ID of this message boards thread
288            */
289            public void setRootMessageUserId(long rootMessageUserId) {
290                    _mbThread.setRootMessageUserId(rootMessageUserId);
291            }
292    
293            /**
294            * Returns the root message user uuid of this message boards thread.
295            *
296            * @return the root message user uuid of this message boards thread
297            * @throws SystemException if a system exception occurred
298            */
299            public java.lang.String getRootMessageUserUuid()
300                    throws com.liferay.portal.kernel.exception.SystemException {
301                    return _mbThread.getRootMessageUserUuid();
302            }
303    
304            /**
305            * Sets the root message user uuid of this message boards thread.
306            *
307            * @param rootMessageUserUuid the root message user uuid of this message boards thread
308            */
309            public void setRootMessageUserUuid(java.lang.String rootMessageUserUuid) {
310                    _mbThread.setRootMessageUserUuid(rootMessageUserUuid);
311            }
312    
313            /**
314            * Returns the message count of this message boards thread.
315            *
316            * @return the message count of this message boards thread
317            */
318            public int getMessageCount() {
319                    return _mbThread.getMessageCount();
320            }
321    
322            /**
323            * Sets the message count of this message boards thread.
324            *
325            * @param messageCount the message count of this message boards thread
326            */
327            public void setMessageCount(int messageCount) {
328                    _mbThread.setMessageCount(messageCount);
329            }
330    
331            /**
332            * Returns the view count of this message boards thread.
333            *
334            * @return the view count of this message boards thread
335            */
336            public int getViewCount() {
337                    return _mbThread.getViewCount();
338            }
339    
340            /**
341            * Sets the view count of this message boards thread.
342            *
343            * @param viewCount the view count of this message boards thread
344            */
345            public void setViewCount(int viewCount) {
346                    _mbThread.setViewCount(viewCount);
347            }
348    
349            /**
350            * Returns the last post by user ID of this message boards thread.
351            *
352            * @return the last post by user ID of this message boards thread
353            */
354            public long getLastPostByUserId() {
355                    return _mbThread.getLastPostByUserId();
356            }
357    
358            /**
359            * Sets the last post by user ID of this message boards thread.
360            *
361            * @param lastPostByUserId the last post by user ID of this message boards thread
362            */
363            public void setLastPostByUserId(long lastPostByUserId) {
364                    _mbThread.setLastPostByUserId(lastPostByUserId);
365            }
366    
367            /**
368            * Returns the last post by user uuid of this message boards thread.
369            *
370            * @return the last post by user uuid of this message boards thread
371            * @throws SystemException if a system exception occurred
372            */
373            public java.lang.String getLastPostByUserUuid()
374                    throws com.liferay.portal.kernel.exception.SystemException {
375                    return _mbThread.getLastPostByUserUuid();
376            }
377    
378            /**
379            * Sets the last post by user uuid of this message boards thread.
380            *
381            * @param lastPostByUserUuid the last post by user uuid of this message boards thread
382            */
383            public void setLastPostByUserUuid(java.lang.String lastPostByUserUuid) {
384                    _mbThread.setLastPostByUserUuid(lastPostByUserUuid);
385            }
386    
387            /**
388            * Returns the last post date of this message boards thread.
389            *
390            * @return the last post date of this message boards thread
391            */
392            public java.util.Date getLastPostDate() {
393                    return _mbThread.getLastPostDate();
394            }
395    
396            /**
397            * Sets the last post date of this message boards thread.
398            *
399            * @param lastPostDate the last post date of this message boards thread
400            */
401            public void setLastPostDate(java.util.Date lastPostDate) {
402                    _mbThread.setLastPostDate(lastPostDate);
403            }
404    
405            /**
406            * Returns the priority of this message boards thread.
407            *
408            * @return the priority of this message boards thread
409            */
410            public double getPriority() {
411                    return _mbThread.getPriority();
412            }
413    
414            /**
415            * Sets the priority of this message boards thread.
416            *
417            * @param priority the priority of this message boards thread
418            */
419            public void setPriority(double priority) {
420                    _mbThread.setPriority(priority);
421            }
422    
423            /**
424            * Returns the question of this message boards thread.
425            *
426            * @return the question of this message boards thread
427            */
428            public boolean getQuestion() {
429                    return _mbThread.getQuestion();
430            }
431    
432            /**
433            * Returns <code>true</code> if this message boards thread is question.
434            *
435            * @return <code>true</code> if this message boards thread is question; <code>false</code> otherwise
436            */
437            public boolean isQuestion() {
438                    return _mbThread.isQuestion();
439            }
440    
441            /**
442            * Sets whether this message boards thread is question.
443            *
444            * @param question the question of this message boards thread
445            */
446            public void setQuestion(boolean question) {
447                    _mbThread.setQuestion(question);
448            }
449    
450            /**
451            * Returns the status of this message boards thread.
452            *
453            * @return the status of this message boards thread
454            */
455            public int getStatus() {
456                    return _mbThread.getStatus();
457            }
458    
459            /**
460            * Sets the status of this message boards thread.
461            *
462            * @param status the status of this message boards thread
463            */
464            public void setStatus(int status) {
465                    _mbThread.setStatus(status);
466            }
467    
468            /**
469            * Returns the status by user ID of this message boards thread.
470            *
471            * @return the status by user ID of this message boards thread
472            */
473            public long getStatusByUserId() {
474                    return _mbThread.getStatusByUserId();
475            }
476    
477            /**
478            * Sets the status by user ID of this message boards thread.
479            *
480            * @param statusByUserId the status by user ID of this message boards thread
481            */
482            public void setStatusByUserId(long statusByUserId) {
483                    _mbThread.setStatusByUserId(statusByUserId);
484            }
485    
486            /**
487            * Returns the status by user uuid of this message boards thread.
488            *
489            * @return the status by user uuid of this message boards thread
490            * @throws SystemException if a system exception occurred
491            */
492            public java.lang.String getStatusByUserUuid()
493                    throws com.liferay.portal.kernel.exception.SystemException {
494                    return _mbThread.getStatusByUserUuid();
495            }
496    
497            /**
498            * Sets the status by user uuid of this message boards thread.
499            *
500            * @param statusByUserUuid the status by user uuid of this message boards thread
501            */
502            public void setStatusByUserUuid(java.lang.String statusByUserUuid) {
503                    _mbThread.setStatusByUserUuid(statusByUserUuid);
504            }
505    
506            /**
507            * Returns the status by user name of this message boards thread.
508            *
509            * @return the status by user name of this message boards thread
510            */
511            public java.lang.String getStatusByUserName() {
512                    return _mbThread.getStatusByUserName();
513            }
514    
515            /**
516            * Sets the status by user name of this message boards thread.
517            *
518            * @param statusByUserName the status by user name of this message boards thread
519            */
520            public void setStatusByUserName(java.lang.String statusByUserName) {
521                    _mbThread.setStatusByUserName(statusByUserName);
522            }
523    
524            /**
525            * Returns the status date of this message boards thread.
526            *
527            * @return the status date of this message boards thread
528            */
529            public java.util.Date getStatusDate() {
530                    return _mbThread.getStatusDate();
531            }
532    
533            /**
534            * Sets the status date of this message boards thread.
535            *
536            * @param statusDate the status date of this message boards thread
537            */
538            public void setStatusDate(java.util.Date statusDate) {
539                    _mbThread.setStatusDate(statusDate);
540            }
541    
542            /**
543            * @deprecated Renamed to {@link #isApproved()}
544            */
545            public boolean getApproved() {
546                    return _mbThread.getApproved();
547            }
548    
549            /**
550            * Returns <code>true</code> if this message boards thread is approved.
551            *
552            * @return <code>true</code> if this message boards thread is approved; <code>false</code> otherwise
553            */
554            public boolean isApproved() {
555                    return _mbThread.isApproved();
556            }
557    
558            /**
559            * Returns <code>true</code> if this message boards thread is denied.
560            *
561            * @return <code>true</code> if this message boards thread is denied; <code>false</code> otherwise
562            */
563            public boolean isDenied() {
564                    return _mbThread.isDenied();
565            }
566    
567            /**
568            * Returns <code>true</code> if this message boards thread is a draft.
569            *
570            * @return <code>true</code> if this message boards thread is a draft; <code>false</code> otherwise
571            */
572            public boolean isDraft() {
573                    return _mbThread.isDraft();
574            }
575    
576            /**
577            * Returns <code>true</code> if this message boards thread is expired.
578            *
579            * @return <code>true</code> if this message boards thread is expired; <code>false</code> otherwise
580            */
581            public boolean isExpired() {
582                    return _mbThread.isExpired();
583            }
584    
585            /**
586            * Returns <code>true</code> if this message boards thread is inactive.
587            *
588            * @return <code>true</code> if this message boards thread is inactive; <code>false</code> otherwise
589            */
590            public boolean isInactive() {
591                    return _mbThread.isInactive();
592            }
593    
594            /**
595            * Returns <code>true</code> if this message boards thread is incomplete.
596            *
597            * @return <code>true</code> if this message boards thread is incomplete; <code>false</code> otherwise
598            */
599            public boolean isIncomplete() {
600                    return _mbThread.isIncomplete();
601            }
602    
603            /**
604            * Returns <code>true</code> if this message boards thread is pending.
605            *
606            * @return <code>true</code> if this message boards thread is pending; <code>false</code> otherwise
607            */
608            public boolean isPending() {
609                    return _mbThread.isPending();
610            }
611    
612            /**
613            * Returns <code>true</code> if this message boards thread is scheduled.
614            *
615            * @return <code>true</code> if this message boards thread is scheduled; <code>false</code> otherwise
616            */
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            /**
735             * @deprecated Renamed to {@link #getWrappedModel}
736             */
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    }