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    
064                    return attributes;
065            }
066    
067            public void setModelAttributes(Map<String, Object> attributes) {
068                    String uuid = (String)attributes.get("uuid");
069    
070                    if (uuid != null) {
071                            setUuid(uuid);
072                    }
073    
074                    Long categoryId = (Long)attributes.get("categoryId");
075    
076                    if (categoryId != null) {
077                            setCategoryId(categoryId);
078                    }
079    
080                    Long groupId = (Long)attributes.get("groupId");
081    
082                    if (groupId != null) {
083                            setGroupId(groupId);
084                    }
085    
086                    Long companyId = (Long)attributes.get("companyId");
087    
088                    if (companyId != null) {
089                            setCompanyId(companyId);
090                    }
091    
092                    Long userId = (Long)attributes.get("userId");
093    
094                    if (userId != null) {
095                            setUserId(userId);
096                    }
097    
098                    String userName = (String)attributes.get("userName");
099    
100                    if (userName != null) {
101                            setUserName(userName);
102                    }
103    
104                    Date createDate = (Date)attributes.get("createDate");
105    
106                    if (createDate != null) {
107                            setCreateDate(createDate);
108                    }
109    
110                    Date modifiedDate = (Date)attributes.get("modifiedDate");
111    
112                    if (modifiedDate != null) {
113                            setModifiedDate(modifiedDate);
114                    }
115    
116                    Long parentCategoryId = (Long)attributes.get("parentCategoryId");
117    
118                    if (parentCategoryId != null) {
119                            setParentCategoryId(parentCategoryId);
120                    }
121    
122                    String name = (String)attributes.get("name");
123    
124                    if (name != null) {
125                            setName(name);
126                    }
127    
128                    String description = (String)attributes.get("description");
129    
130                    if (description != null) {
131                            setDescription(description);
132                    }
133    
134                    String displayStyle = (String)attributes.get("displayStyle");
135    
136                    if (displayStyle != null) {
137                            setDisplayStyle(displayStyle);
138                    }
139    
140                    Integer threadCount = (Integer)attributes.get("threadCount");
141    
142                    if (threadCount != null) {
143                            setThreadCount(threadCount);
144                    }
145    
146                    Integer messageCount = (Integer)attributes.get("messageCount");
147    
148                    if (messageCount != null) {
149                            setMessageCount(messageCount);
150                    }
151    
152                    Date lastPostDate = (Date)attributes.get("lastPostDate");
153    
154                    if (lastPostDate != null) {
155                            setLastPostDate(lastPostDate);
156                    }
157            }
158    
159            /**
160            * Returns the primary key of this message boards category.
161            *
162            * @return the primary key of this message boards category
163            */
164            public long getPrimaryKey() {
165                    return _mbCategory.getPrimaryKey();
166            }
167    
168            /**
169            * Sets the primary key of this message boards category.
170            *
171            * @param primaryKey the primary key of this message boards category
172            */
173            public void setPrimaryKey(long primaryKey) {
174                    _mbCategory.setPrimaryKey(primaryKey);
175            }
176    
177            /**
178            * Returns the uuid of this message boards category.
179            *
180            * @return the uuid of this message boards category
181            */
182            public java.lang.String getUuid() {
183                    return _mbCategory.getUuid();
184            }
185    
186            /**
187            * Sets the uuid of this message boards category.
188            *
189            * @param uuid the uuid of this message boards category
190            */
191            public void setUuid(java.lang.String uuid) {
192                    _mbCategory.setUuid(uuid);
193            }
194    
195            /**
196            * Returns the category ID of this message boards category.
197            *
198            * @return the category ID of this message boards category
199            */
200            public long getCategoryId() {
201                    return _mbCategory.getCategoryId();
202            }
203    
204            /**
205            * Sets the category ID of this message boards category.
206            *
207            * @param categoryId the category ID of this message boards category
208            */
209            public void setCategoryId(long categoryId) {
210                    _mbCategory.setCategoryId(categoryId);
211            }
212    
213            /**
214            * Returns the group ID of this message boards category.
215            *
216            * @return the group ID of this message boards category
217            */
218            public long getGroupId() {
219                    return _mbCategory.getGroupId();
220            }
221    
222            /**
223            * Sets the group ID of this message boards category.
224            *
225            * @param groupId the group ID of this message boards category
226            */
227            public void setGroupId(long groupId) {
228                    _mbCategory.setGroupId(groupId);
229            }
230    
231            /**
232            * Returns the company ID of this message boards category.
233            *
234            * @return the company ID of this message boards category
235            */
236            public long getCompanyId() {
237                    return _mbCategory.getCompanyId();
238            }
239    
240            /**
241            * Sets the company ID of this message boards category.
242            *
243            * @param companyId the company ID of this message boards category
244            */
245            public void setCompanyId(long companyId) {
246                    _mbCategory.setCompanyId(companyId);
247            }
248    
249            /**
250            * Returns the user ID of this message boards category.
251            *
252            * @return the user ID of this message boards category
253            */
254            public long getUserId() {
255                    return _mbCategory.getUserId();
256            }
257    
258            /**
259            * Sets the user ID of this message boards category.
260            *
261            * @param userId the user ID of this message boards category
262            */
263            public void setUserId(long userId) {
264                    _mbCategory.setUserId(userId);
265            }
266    
267            /**
268            * Returns the user uuid of this message boards category.
269            *
270            * @return the user uuid of this message boards category
271            * @throws SystemException if a system exception occurred
272            */
273            public java.lang.String getUserUuid()
274                    throws com.liferay.portal.kernel.exception.SystemException {
275                    return _mbCategory.getUserUuid();
276            }
277    
278            /**
279            * Sets the user uuid of this message boards category.
280            *
281            * @param userUuid the user uuid of this message boards category
282            */
283            public void setUserUuid(java.lang.String userUuid) {
284                    _mbCategory.setUserUuid(userUuid);
285            }
286    
287            /**
288            * Returns the user name of this message boards category.
289            *
290            * @return the user name of this message boards category
291            */
292            public java.lang.String getUserName() {
293                    return _mbCategory.getUserName();
294            }
295    
296            /**
297            * Sets the user name of this message boards category.
298            *
299            * @param userName the user name of this message boards category
300            */
301            public void setUserName(java.lang.String userName) {
302                    _mbCategory.setUserName(userName);
303            }
304    
305            /**
306            * Returns the create date of this message boards category.
307            *
308            * @return the create date of this message boards category
309            */
310            public java.util.Date getCreateDate() {
311                    return _mbCategory.getCreateDate();
312            }
313    
314            /**
315            * Sets the create date of this message boards category.
316            *
317            * @param createDate the create date of this message boards category
318            */
319            public void setCreateDate(java.util.Date createDate) {
320                    _mbCategory.setCreateDate(createDate);
321            }
322    
323            /**
324            * Returns the modified date of this message boards category.
325            *
326            * @return the modified date of this message boards category
327            */
328            public java.util.Date getModifiedDate() {
329                    return _mbCategory.getModifiedDate();
330            }
331    
332            /**
333            * Sets the modified date of this message boards category.
334            *
335            * @param modifiedDate the modified date of this message boards category
336            */
337            public void setModifiedDate(java.util.Date modifiedDate) {
338                    _mbCategory.setModifiedDate(modifiedDate);
339            }
340    
341            /**
342            * Returns the parent category ID of this message boards category.
343            *
344            * @return the parent category ID of this message boards category
345            */
346            public long getParentCategoryId() {
347                    return _mbCategory.getParentCategoryId();
348            }
349    
350            /**
351            * Sets the parent category ID of this message boards category.
352            *
353            * @param parentCategoryId the parent category ID of this message boards category
354            */
355            public void setParentCategoryId(long parentCategoryId) {
356                    _mbCategory.setParentCategoryId(parentCategoryId);
357            }
358    
359            /**
360            * Returns the name of this message boards category.
361            *
362            * @return the name of this message boards category
363            */
364            public java.lang.String getName() {
365                    return _mbCategory.getName();
366            }
367    
368            /**
369            * Sets the name of this message boards category.
370            *
371            * @param name the name of this message boards category
372            */
373            public void setName(java.lang.String name) {
374                    _mbCategory.setName(name);
375            }
376    
377            /**
378            * Returns the description of this message boards category.
379            *
380            * @return the description of this message boards category
381            */
382            public java.lang.String getDescription() {
383                    return _mbCategory.getDescription();
384            }
385    
386            /**
387            * Sets the description of this message boards category.
388            *
389            * @param description the description of this message boards category
390            */
391            public void setDescription(java.lang.String description) {
392                    _mbCategory.setDescription(description);
393            }
394    
395            /**
396            * Returns the display style of this message boards category.
397            *
398            * @return the display style of this message boards category
399            */
400            public java.lang.String getDisplayStyle() {
401                    return _mbCategory.getDisplayStyle();
402            }
403    
404            /**
405            * Sets the display style of this message boards category.
406            *
407            * @param displayStyle the display style of this message boards category
408            */
409            public void setDisplayStyle(java.lang.String displayStyle) {
410                    _mbCategory.setDisplayStyle(displayStyle);
411            }
412    
413            /**
414            * Returns the thread count of this message boards category.
415            *
416            * @return the thread count of this message boards category
417            */
418            public int getThreadCount() {
419                    return _mbCategory.getThreadCount();
420            }
421    
422            /**
423            * Sets the thread count of this message boards category.
424            *
425            * @param threadCount the thread count of this message boards category
426            */
427            public void setThreadCount(int threadCount) {
428                    _mbCategory.setThreadCount(threadCount);
429            }
430    
431            /**
432            * Returns the message count of this message boards category.
433            *
434            * @return the message count of this message boards category
435            */
436            public int getMessageCount() {
437                    return _mbCategory.getMessageCount();
438            }
439    
440            /**
441            * Sets the message count of this message boards category.
442            *
443            * @param messageCount the message count of this message boards category
444            */
445            public void setMessageCount(int messageCount) {
446                    _mbCategory.setMessageCount(messageCount);
447            }
448    
449            /**
450            * Returns the last post date of this message boards category.
451            *
452            * @return the last post date of this message boards category
453            */
454            public java.util.Date getLastPostDate() {
455                    return _mbCategory.getLastPostDate();
456            }
457    
458            /**
459            * Sets the last post date of this message boards category.
460            *
461            * @param lastPostDate the last post date of this message boards category
462            */
463            public void setLastPostDate(java.util.Date lastPostDate) {
464                    _mbCategory.setLastPostDate(lastPostDate);
465            }
466    
467            public boolean isNew() {
468                    return _mbCategory.isNew();
469            }
470    
471            public void setNew(boolean n) {
472                    _mbCategory.setNew(n);
473            }
474    
475            public boolean isCachedModel() {
476                    return _mbCategory.isCachedModel();
477            }
478    
479            public void setCachedModel(boolean cachedModel) {
480                    _mbCategory.setCachedModel(cachedModel);
481            }
482    
483            public boolean isEscapedModel() {
484                    return _mbCategory.isEscapedModel();
485            }
486    
487            public java.io.Serializable getPrimaryKeyObj() {
488                    return _mbCategory.getPrimaryKeyObj();
489            }
490    
491            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
492                    _mbCategory.setPrimaryKeyObj(primaryKeyObj);
493            }
494    
495            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
496                    return _mbCategory.getExpandoBridge();
497            }
498    
499            public void setExpandoBridgeAttributes(
500                    com.liferay.portal.service.ServiceContext serviceContext) {
501                    _mbCategory.setExpandoBridgeAttributes(serviceContext);
502            }
503    
504            @Override
505            public java.lang.Object clone() {
506                    return new MBCategoryWrapper((MBCategory)_mbCategory.clone());
507            }
508    
509            public int compareTo(
510                    com.liferay.portlet.messageboards.model.MBCategory mbCategory) {
511                    return _mbCategory.compareTo(mbCategory);
512            }
513    
514            @Override
515            public int hashCode() {
516                    return _mbCategory.hashCode();
517            }
518    
519            public com.liferay.portal.model.CacheModel<com.liferay.portlet.messageboards.model.MBCategory> toCacheModel() {
520                    return _mbCategory.toCacheModel();
521            }
522    
523            public com.liferay.portlet.messageboards.model.MBCategory toEscapedModel() {
524                    return new MBCategoryWrapper(_mbCategory.toEscapedModel());
525            }
526    
527            @Override
528            public java.lang.String toString() {
529                    return _mbCategory.toString();
530            }
531    
532            public java.lang.String toXmlString() {
533                    return _mbCategory.toXmlString();
534            }
535    
536            public void persist()
537                    throws com.liferay.portal.kernel.exception.SystemException {
538                    _mbCategory.persist();
539            }
540    
541            public java.util.List<java.lang.Long> getAncestorCategoryIds()
542                    throws com.liferay.portal.kernel.exception.PortalException,
543                            com.liferay.portal.kernel.exception.SystemException {
544                    return _mbCategory.getAncestorCategoryIds();
545            }
546    
547            public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getAncestors()
548                    throws com.liferay.portal.kernel.exception.PortalException,
549                            com.liferay.portal.kernel.exception.SystemException {
550                    return _mbCategory.getAncestors();
551            }
552    
553            public boolean isRoot() {
554                    return _mbCategory.isRoot();
555            }
556    
557            /**
558             * @deprecated Renamed to {@link #getWrappedModel}
559             */
560            public MBCategory getWrappedMBCategory() {
561                    return _mbCategory;
562            }
563    
564            public MBCategory getWrappedModel() {
565                    return _mbCategory;
566            }
567    
568            public void resetOriginalValues() {
569                    _mbCategory.resetOriginalValues();
570            }
571    
572            private MBCategory _mbCategory;
573    }