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 MBCategory}.
026     * </p>
027     *
028     * @author    Brian Wing Shun Chan
029     * @see       MBCategory
030     * @generated
031     */
032    public class MBCategoryWrapper implements MBCategory, ModelWrapper<MBCategory> {
033            public MBCategoryWrapper(MBCategory mbCategory) {
034                    _mbCategory = mbCategory;
035            }
036    
037            public Class<?> getModelClass() {
038                    return MBCategory.class;
039            }
040    
041            public String getModelClassName() {
042                    return MBCategory.class.getName();
043            }
044    
045            public Map<String, Object> getModelAttributes() {
046                    Map<String, Object> attributes = new HashMap<String, Object>();
047    
048                    attributes.put("uuid", getUuid());
049                    attributes.put("categoryId", getCategoryId());
050                    attributes.put("groupId", getGroupId());
051                    attributes.put("companyId", getCompanyId());
052                    attributes.put("userId", getUserId());
053                    attributes.put("userName", getUserName());
054                    attributes.put("createDate", getCreateDate());
055                    attributes.put("modifiedDate", getModifiedDate());
056                    attributes.put("parentCategoryId", getParentCategoryId());
057                    attributes.put("name", getName());
058                    attributes.put("description", getDescription());
059                    attributes.put("displayStyle", getDisplayStyle());
060                    attributes.put("threadCount", getThreadCount());
061                    attributes.put("messageCount", getMessageCount());
062                    attributes.put("lastPostDate", getLastPostDate());
063                    attributes.put("status", getStatus());
064                    attributes.put("statusByUserId", getStatusByUserId());
065                    attributes.put("statusByUserName", getStatusByUserName());
066                    attributes.put("statusDate", getStatusDate());
067    
068                    return attributes;
069            }
070    
071            public void setModelAttributes(Map<String, Object> attributes) {
072                    String uuid = (String)attributes.get("uuid");
073    
074                    if (uuid != null) {
075                            setUuid(uuid);
076                    }
077    
078                    Long categoryId = (Long)attributes.get("categoryId");
079    
080                    if (categoryId != null) {
081                            setCategoryId(categoryId);
082                    }
083    
084                    Long groupId = (Long)attributes.get("groupId");
085    
086                    if (groupId != null) {
087                            setGroupId(groupId);
088                    }
089    
090                    Long companyId = (Long)attributes.get("companyId");
091    
092                    if (companyId != null) {
093                            setCompanyId(companyId);
094                    }
095    
096                    Long userId = (Long)attributes.get("userId");
097    
098                    if (userId != null) {
099                            setUserId(userId);
100                    }
101    
102                    String userName = (String)attributes.get("userName");
103    
104                    if (userName != null) {
105                            setUserName(userName);
106                    }
107    
108                    Date createDate = (Date)attributes.get("createDate");
109    
110                    if (createDate != null) {
111                            setCreateDate(createDate);
112                    }
113    
114                    Date modifiedDate = (Date)attributes.get("modifiedDate");
115    
116                    if (modifiedDate != null) {
117                            setModifiedDate(modifiedDate);
118                    }
119    
120                    Long parentCategoryId = (Long)attributes.get("parentCategoryId");
121    
122                    if (parentCategoryId != null) {
123                            setParentCategoryId(parentCategoryId);
124                    }
125    
126                    String name = (String)attributes.get("name");
127    
128                    if (name != null) {
129                            setName(name);
130                    }
131    
132                    String description = (String)attributes.get("description");
133    
134                    if (description != null) {
135                            setDescription(description);
136                    }
137    
138                    String displayStyle = (String)attributes.get("displayStyle");
139    
140                    if (displayStyle != null) {
141                            setDisplayStyle(displayStyle);
142                    }
143    
144                    Integer threadCount = (Integer)attributes.get("threadCount");
145    
146                    if (threadCount != null) {
147                            setThreadCount(threadCount);
148                    }
149    
150                    Integer messageCount = (Integer)attributes.get("messageCount");
151    
152                    if (messageCount != null) {
153                            setMessageCount(messageCount);
154                    }
155    
156                    Date lastPostDate = (Date)attributes.get("lastPostDate");
157    
158                    if (lastPostDate != null) {
159                            setLastPostDate(lastPostDate);
160                    }
161    
162                    Integer status = (Integer)attributes.get("status");
163    
164                    if (status != null) {
165                            setStatus(status);
166                    }
167    
168                    Long statusByUserId = (Long)attributes.get("statusByUserId");
169    
170                    if (statusByUserId != null) {
171                            setStatusByUserId(statusByUserId);
172                    }
173    
174                    String statusByUserName = (String)attributes.get("statusByUserName");
175    
176                    if (statusByUserName != null) {
177                            setStatusByUserName(statusByUserName);
178                    }
179    
180                    Date statusDate = (Date)attributes.get("statusDate");
181    
182                    if (statusDate != null) {
183                            setStatusDate(statusDate);
184                    }
185            }
186    
187            /**
188            * Returns the primary key of this message boards category.
189            *
190            * @return the primary key of this message boards category
191            */
192            public long getPrimaryKey() {
193                    return _mbCategory.getPrimaryKey();
194            }
195    
196            /**
197            * Sets the primary key of this message boards category.
198            *
199            * @param primaryKey the primary key of this message boards category
200            */
201            public void setPrimaryKey(long primaryKey) {
202                    _mbCategory.setPrimaryKey(primaryKey);
203            }
204    
205            /**
206            * Returns the uuid of this message boards category.
207            *
208            * @return the uuid of this message boards category
209            */
210            public java.lang.String getUuid() {
211                    return _mbCategory.getUuid();
212            }
213    
214            /**
215            * Sets the uuid of this message boards category.
216            *
217            * @param uuid the uuid of this message boards category
218            */
219            public void setUuid(java.lang.String uuid) {
220                    _mbCategory.setUuid(uuid);
221            }
222    
223            /**
224            * Returns the category ID of this message boards category.
225            *
226            * @return the category ID of this message boards category
227            */
228            public long getCategoryId() {
229                    return _mbCategory.getCategoryId();
230            }
231    
232            /**
233            * Sets the category ID of this message boards category.
234            *
235            * @param categoryId the category ID of this message boards category
236            */
237            public void setCategoryId(long categoryId) {
238                    _mbCategory.setCategoryId(categoryId);
239            }
240    
241            /**
242            * Returns the group ID of this message boards category.
243            *
244            * @return the group ID of this message boards category
245            */
246            public long getGroupId() {
247                    return _mbCategory.getGroupId();
248            }
249    
250            /**
251            * Sets the group ID of this message boards category.
252            *
253            * @param groupId the group ID of this message boards category
254            */
255            public void setGroupId(long groupId) {
256                    _mbCategory.setGroupId(groupId);
257            }
258    
259            /**
260            * Returns the company ID of this message boards category.
261            *
262            * @return the company ID of this message boards category
263            */
264            public long getCompanyId() {
265                    return _mbCategory.getCompanyId();
266            }
267    
268            /**
269            * Sets the company ID of this message boards category.
270            *
271            * @param companyId the company ID of this message boards category
272            */
273            public void setCompanyId(long companyId) {
274                    _mbCategory.setCompanyId(companyId);
275            }
276    
277            /**
278            * Returns the user ID of this message boards category.
279            *
280            * @return the user ID of this message boards category
281            */
282            public long getUserId() {
283                    return _mbCategory.getUserId();
284            }
285    
286            /**
287            * Sets the user ID of this message boards category.
288            *
289            * @param userId the user ID of this message boards category
290            */
291            public void setUserId(long userId) {
292                    _mbCategory.setUserId(userId);
293            }
294    
295            /**
296            * Returns the user uuid of this message boards category.
297            *
298            * @return the user uuid of this message boards category
299            * @throws SystemException if a system exception occurred
300            */
301            public java.lang.String getUserUuid()
302                    throws com.liferay.portal.kernel.exception.SystemException {
303                    return _mbCategory.getUserUuid();
304            }
305    
306            /**
307            * Sets the user uuid of this message boards category.
308            *
309            * @param userUuid the user uuid of this message boards category
310            */
311            public void setUserUuid(java.lang.String userUuid) {
312                    _mbCategory.setUserUuid(userUuid);
313            }
314    
315            /**
316            * Returns the user name of this message boards category.
317            *
318            * @return the user name of this message boards category
319            */
320            public java.lang.String getUserName() {
321                    return _mbCategory.getUserName();
322            }
323    
324            /**
325            * Sets the user name of this message boards category.
326            *
327            * @param userName the user name of this message boards category
328            */
329            public void setUserName(java.lang.String userName) {
330                    _mbCategory.setUserName(userName);
331            }
332    
333            /**
334            * Returns the create date of this message boards category.
335            *
336            * @return the create date of this message boards category
337            */
338            public java.util.Date getCreateDate() {
339                    return _mbCategory.getCreateDate();
340            }
341    
342            /**
343            * Sets the create date of this message boards category.
344            *
345            * @param createDate the create date of this message boards category
346            */
347            public void setCreateDate(java.util.Date createDate) {
348                    _mbCategory.setCreateDate(createDate);
349            }
350    
351            /**
352            * Returns the modified date of this message boards category.
353            *
354            * @return the modified date of this message boards category
355            */
356            public java.util.Date getModifiedDate() {
357                    return _mbCategory.getModifiedDate();
358            }
359    
360            /**
361            * Sets the modified date of this message boards category.
362            *
363            * @param modifiedDate the modified date of this message boards category
364            */
365            public void setModifiedDate(java.util.Date modifiedDate) {
366                    _mbCategory.setModifiedDate(modifiedDate);
367            }
368    
369            /**
370            * Returns the parent category ID of this message boards category.
371            *
372            * @return the parent category ID of this message boards category
373            */
374            public long getParentCategoryId() {
375                    return _mbCategory.getParentCategoryId();
376            }
377    
378            /**
379            * Sets the parent category ID of this message boards category.
380            *
381            * @param parentCategoryId the parent category ID of this message boards category
382            */
383            public void setParentCategoryId(long parentCategoryId) {
384                    _mbCategory.setParentCategoryId(parentCategoryId);
385            }
386    
387            /**
388            * Returns the name of this message boards category.
389            *
390            * @return the name of this message boards category
391            */
392            public java.lang.String getName() {
393                    return _mbCategory.getName();
394            }
395    
396            /**
397            * Sets the name of this message boards category.
398            *
399            * @param name the name of this message boards category
400            */
401            public void setName(java.lang.String name) {
402                    _mbCategory.setName(name);
403            }
404    
405            /**
406            * Returns the description of this message boards category.
407            *
408            * @return the description of this message boards category
409            */
410            public java.lang.String getDescription() {
411                    return _mbCategory.getDescription();
412            }
413    
414            /**
415            * Sets the description of this message boards category.
416            *
417            * @param description the description of this message boards category
418            */
419            public void setDescription(java.lang.String description) {
420                    _mbCategory.setDescription(description);
421            }
422    
423            /**
424            * Returns the display style of this message boards category.
425            *
426            * @return the display style of this message boards category
427            */
428            public java.lang.String getDisplayStyle() {
429                    return _mbCategory.getDisplayStyle();
430            }
431    
432            /**
433            * Sets the display style of this message boards category.
434            *
435            * @param displayStyle the display style of this message boards category
436            */
437            public void setDisplayStyle(java.lang.String displayStyle) {
438                    _mbCategory.setDisplayStyle(displayStyle);
439            }
440    
441            /**
442            * Returns the thread count of this message boards category.
443            *
444            * @return the thread count of this message boards category
445            */
446            public int getThreadCount() {
447                    return _mbCategory.getThreadCount();
448            }
449    
450            /**
451            * Sets the thread count of this message boards category.
452            *
453            * @param threadCount the thread count of this message boards category
454            */
455            public void setThreadCount(int threadCount) {
456                    _mbCategory.setThreadCount(threadCount);
457            }
458    
459            /**
460            * Returns the message count of this message boards category.
461            *
462            * @return the message count of this message boards category
463            */
464            public int getMessageCount() {
465                    return _mbCategory.getMessageCount();
466            }
467    
468            /**
469            * Sets the message count of this message boards category.
470            *
471            * @param messageCount the message count of this message boards category
472            */
473            public void setMessageCount(int messageCount) {
474                    _mbCategory.setMessageCount(messageCount);
475            }
476    
477            /**
478            * Returns the last post date of this message boards category.
479            *
480            * @return the last post date of this message boards category
481            */
482            public java.util.Date getLastPostDate() {
483                    return _mbCategory.getLastPostDate();
484            }
485    
486            /**
487            * Sets the last post date of this message boards category.
488            *
489            * @param lastPostDate the last post date of this message boards category
490            */
491            public void setLastPostDate(java.util.Date lastPostDate) {
492                    _mbCategory.setLastPostDate(lastPostDate);
493            }
494    
495            /**
496            * Returns the status of this message boards category.
497            *
498            * @return the status of this message boards category
499            */
500            public int getStatus() {
501                    return _mbCategory.getStatus();
502            }
503    
504            /**
505            * Sets the status of this message boards category.
506            *
507            * @param status the status of this message boards category
508            */
509            public void setStatus(int status) {
510                    _mbCategory.setStatus(status);
511            }
512    
513            /**
514            * Returns the status by user ID of this message boards category.
515            *
516            * @return the status by user ID of this message boards category
517            */
518            public long getStatusByUserId() {
519                    return _mbCategory.getStatusByUserId();
520            }
521    
522            /**
523            * Sets the status by user ID of this message boards category.
524            *
525            * @param statusByUserId the status by user ID of this message boards category
526            */
527            public void setStatusByUserId(long statusByUserId) {
528                    _mbCategory.setStatusByUserId(statusByUserId);
529            }
530    
531            /**
532            * Returns the status by user uuid of this message boards category.
533            *
534            * @return the status by user uuid of this message boards category
535            * @throws SystemException if a system exception occurred
536            */
537            public java.lang.String getStatusByUserUuid()
538                    throws com.liferay.portal.kernel.exception.SystemException {
539                    return _mbCategory.getStatusByUserUuid();
540            }
541    
542            /**
543            * Sets the status by user uuid of this message boards category.
544            *
545            * @param statusByUserUuid the status by user uuid of this message boards category
546            */
547            public void setStatusByUserUuid(java.lang.String statusByUserUuid) {
548                    _mbCategory.setStatusByUserUuid(statusByUserUuid);
549            }
550    
551            /**
552            * Returns the status by user name of this message boards category.
553            *
554            * @return the status by user name of this message boards category
555            */
556            public java.lang.String getStatusByUserName() {
557                    return _mbCategory.getStatusByUserName();
558            }
559    
560            /**
561            * Sets the status by user name of this message boards category.
562            *
563            * @param statusByUserName the status by user name of this message boards category
564            */
565            public void setStatusByUserName(java.lang.String statusByUserName) {
566                    _mbCategory.setStatusByUserName(statusByUserName);
567            }
568    
569            /**
570            * Returns the status date of this message boards category.
571            *
572            * @return the status date of this message boards category
573            */
574            public java.util.Date getStatusDate() {
575                    return _mbCategory.getStatusDate();
576            }
577    
578            /**
579            * Sets the status date of this message boards category.
580            *
581            * @param statusDate the status date of this message boards category
582            */
583            public void setStatusDate(java.util.Date statusDate) {
584                    _mbCategory.setStatusDate(statusDate);
585            }
586    
587            /**
588            * @deprecated Renamed to {@link #isApproved()}
589            */
590            public boolean getApproved() {
591                    return _mbCategory.getApproved();
592            }
593    
594            /**
595            * Returns <code>true</code> if this message boards category is approved.
596            *
597            * @return <code>true</code> if this message boards category is approved; <code>false</code> otherwise
598            */
599            public boolean isApproved() {
600                    return _mbCategory.isApproved();
601            }
602    
603            /**
604            * Returns <code>true</code> if this message boards category is denied.
605            *
606            * @return <code>true</code> if this message boards category is denied; <code>false</code> otherwise
607            */
608            public boolean isDenied() {
609                    return _mbCategory.isDenied();
610            }
611    
612            /**
613            * Returns <code>true</code> if this message boards category is a draft.
614            *
615            * @return <code>true</code> if this message boards category is a draft; <code>false</code> otherwise
616            */
617            public boolean isDraft() {
618                    return _mbCategory.isDraft();
619            }
620    
621            /**
622            * Returns <code>true</code> if this message boards category is expired.
623            *
624            * @return <code>true</code> if this message boards category is expired; <code>false</code> otherwise
625            */
626            public boolean isExpired() {
627                    return _mbCategory.isExpired();
628            }
629    
630            /**
631            * Returns <code>true</code> if this message boards category is inactive.
632            *
633            * @return <code>true</code> if this message boards category is inactive; <code>false</code> otherwise
634            */
635            public boolean isInactive() {
636                    return _mbCategory.isInactive();
637            }
638    
639            /**
640            * Returns <code>true</code> if this message boards category is incomplete.
641            *
642            * @return <code>true</code> if this message boards category is incomplete; <code>false</code> otherwise
643            */
644            public boolean isIncomplete() {
645                    return _mbCategory.isIncomplete();
646            }
647    
648            /**
649            * Returns <code>true</code> if this message boards category is in the Recycle Bin.
650            *
651            * @return <code>true</code> if this message boards category is in the Recycle Bin; <code>false</code> otherwise
652            */
653            public boolean isInTrash() {
654                    return _mbCategory.isInTrash();
655            }
656    
657            /**
658            * Returns <code>true</code> if this message boards category is pending.
659            *
660            * @return <code>true</code> if this message boards category is pending; <code>false</code> otherwise
661            */
662            public boolean isPending() {
663                    return _mbCategory.isPending();
664            }
665    
666            /**
667            * Returns <code>true</code> if this message boards category is scheduled.
668            *
669            * @return <code>true</code> if this message boards category is scheduled; <code>false</code> otherwise
670            */
671            public boolean isScheduled() {
672                    return _mbCategory.isScheduled();
673            }
674    
675            /**
676            * Returns the container model ID of this message boards category.
677            *
678            * @return the container model ID of this message boards category
679            */
680            public long getContainerModelId() {
681                    return _mbCategory.getContainerModelId();
682            }
683    
684            /**
685            * Sets the container model ID of this message boards category.
686            *
687            * @param container model ID of this message boards category
688            */
689            public void setContainerModelId(long containerModelId) {
690                    _mbCategory.setContainerModelId(containerModelId);
691            }
692    
693            /**
694            * Returns the container name of this message boards category.
695            *
696            * @return the container name of this message boards category
697            */
698            public java.lang.String getContainerModelName() {
699                    return _mbCategory.getContainerModelName();
700            }
701    
702            /**
703            * Returns the parent container model ID of this message boards category.
704            *
705            * @return the parent container model ID of this message boards category
706            */
707            public long getParentContainerModelId() {
708                    return _mbCategory.getParentContainerModelId();
709            }
710    
711            /**
712            * Sets the parent container model ID of this message boards category.
713            *
714            * @param parent container model ID of this message boards category
715            */
716            public void setParentContainerModelId(long parentContainerModelId) {
717                    _mbCategory.setParentContainerModelId(parentContainerModelId);
718            }
719    
720            public boolean isNew() {
721                    return _mbCategory.isNew();
722            }
723    
724            public void setNew(boolean n) {
725                    _mbCategory.setNew(n);
726            }
727    
728            public boolean isCachedModel() {
729                    return _mbCategory.isCachedModel();
730            }
731    
732            public void setCachedModel(boolean cachedModel) {
733                    _mbCategory.setCachedModel(cachedModel);
734            }
735    
736            public boolean isEscapedModel() {
737                    return _mbCategory.isEscapedModel();
738            }
739    
740            public java.io.Serializable getPrimaryKeyObj() {
741                    return _mbCategory.getPrimaryKeyObj();
742            }
743    
744            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
745                    _mbCategory.setPrimaryKeyObj(primaryKeyObj);
746            }
747    
748            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
749                    return _mbCategory.getExpandoBridge();
750            }
751    
752            public void setExpandoBridgeAttributes(
753                    com.liferay.portal.service.ServiceContext serviceContext) {
754                    _mbCategory.setExpandoBridgeAttributes(serviceContext);
755            }
756    
757            @Override
758            public java.lang.Object clone() {
759                    return new MBCategoryWrapper((MBCategory)_mbCategory.clone());
760            }
761    
762            public int compareTo(
763                    com.liferay.portlet.messageboards.model.MBCategory mbCategory) {
764                    return _mbCategory.compareTo(mbCategory);
765            }
766    
767            @Override
768            public int hashCode() {
769                    return _mbCategory.hashCode();
770            }
771    
772            public com.liferay.portal.model.CacheModel<com.liferay.portlet.messageboards.model.MBCategory> toCacheModel() {
773                    return _mbCategory.toCacheModel();
774            }
775    
776            public com.liferay.portlet.messageboards.model.MBCategory toEscapedModel() {
777                    return new MBCategoryWrapper(_mbCategory.toEscapedModel());
778            }
779    
780            public com.liferay.portlet.messageboards.model.MBCategory toUnescapedModel() {
781                    return new MBCategoryWrapper(_mbCategory.toUnescapedModel());
782            }
783    
784            @Override
785            public java.lang.String toString() {
786                    return _mbCategory.toString();
787            }
788    
789            public java.lang.String toXmlString() {
790                    return _mbCategory.toXmlString();
791            }
792    
793            public void persist()
794                    throws com.liferay.portal.kernel.exception.SystemException {
795                    _mbCategory.persist();
796            }
797    
798            public java.util.List<java.lang.Long> getAncestorCategoryIds()
799                    throws com.liferay.portal.kernel.exception.PortalException,
800                            com.liferay.portal.kernel.exception.SystemException {
801                    return _mbCategory.getAncestorCategoryIds();
802            }
803    
804            public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getAncestors()
805                    throws com.liferay.portal.kernel.exception.PortalException,
806                            com.liferay.portal.kernel.exception.SystemException {
807                    return _mbCategory.getAncestors();
808            }
809    
810            public com.liferay.portlet.messageboards.model.MBCategory getParentCategory()
811                    throws com.liferay.portal.kernel.exception.PortalException,
812                            com.liferay.portal.kernel.exception.SystemException {
813                    return _mbCategory.getParentCategory();
814            }
815    
816            public com.liferay.portlet.messageboards.model.MBCategory getTrashContainer() {
817                    return _mbCategory.getTrashContainer();
818            }
819    
820            public boolean isInTrashContainer() {
821                    return _mbCategory.isInTrashContainer();
822            }
823    
824            public boolean isRoot() {
825                    return _mbCategory.isRoot();
826            }
827    
828            /**
829             * @deprecated Renamed to {@link #getWrappedModel}
830             */
831            public MBCategory getWrappedMBCategory() {
832                    return _mbCategory;
833            }
834    
835            public MBCategory getWrappedModel() {
836                    return _mbCategory;
837            }
838    
839            public void resetOriginalValues() {
840                    _mbCategory.resetOriginalValues();
841            }
842    
843            private MBCategory _mbCategory;
844    }