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.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 MBDiscussion}.
026     * </p>
027     *
028     * @author    Brian Wing Shun Chan
029     * @see       MBDiscussion
030     * @generated
031     */
032    public class MBDiscussionWrapper implements MBDiscussion,
033            ModelWrapper<MBDiscussion> {
034            public MBDiscussionWrapper(MBDiscussion mbDiscussion) {
035                    _mbDiscussion = mbDiscussion;
036            }
037    
038            public Class<?> getModelClass() {
039                    return MBDiscussion.class;
040            }
041    
042            public String getModelClassName() {
043                    return MBDiscussion.class.getName();
044            }
045    
046            public Map<String, Object> getModelAttributes() {
047                    Map<String, Object> attributes = new HashMap<String, Object>();
048    
049                    attributes.put("uuid", getUuid());
050                    attributes.put("discussionId", getDiscussionId());
051                    attributes.put("groupId", getGroupId());
052                    attributes.put("companyId", getCompanyId());
053                    attributes.put("userId", getUserId());
054                    attributes.put("userName", getUserName());
055                    attributes.put("createDate", getCreateDate());
056                    attributes.put("modifiedDate", getModifiedDate());
057                    attributes.put("classNameId", getClassNameId());
058                    attributes.put("classPK", getClassPK());
059                    attributes.put("threadId", getThreadId());
060    
061                    return attributes;
062            }
063    
064            public void setModelAttributes(Map<String, Object> attributes) {
065                    String uuid = (String)attributes.get("uuid");
066    
067                    if (uuid != null) {
068                            setUuid(uuid);
069                    }
070    
071                    Long discussionId = (Long)attributes.get("discussionId");
072    
073                    if (discussionId != null) {
074                            setDiscussionId(discussionId);
075                    }
076    
077                    Long groupId = (Long)attributes.get("groupId");
078    
079                    if (groupId != null) {
080                            setGroupId(groupId);
081                    }
082    
083                    Long companyId = (Long)attributes.get("companyId");
084    
085                    if (companyId != null) {
086                            setCompanyId(companyId);
087                    }
088    
089                    Long userId = (Long)attributes.get("userId");
090    
091                    if (userId != null) {
092                            setUserId(userId);
093                    }
094    
095                    String userName = (String)attributes.get("userName");
096    
097                    if (userName != null) {
098                            setUserName(userName);
099                    }
100    
101                    Date createDate = (Date)attributes.get("createDate");
102    
103                    if (createDate != null) {
104                            setCreateDate(createDate);
105                    }
106    
107                    Date modifiedDate = (Date)attributes.get("modifiedDate");
108    
109                    if (modifiedDate != null) {
110                            setModifiedDate(modifiedDate);
111                    }
112    
113                    Long classNameId = (Long)attributes.get("classNameId");
114    
115                    if (classNameId != null) {
116                            setClassNameId(classNameId);
117                    }
118    
119                    Long classPK = (Long)attributes.get("classPK");
120    
121                    if (classPK != null) {
122                            setClassPK(classPK);
123                    }
124    
125                    Long threadId = (Long)attributes.get("threadId");
126    
127                    if (threadId != null) {
128                            setThreadId(threadId);
129                    }
130            }
131    
132            /**
133            * Returns the primary key of this message boards discussion.
134            *
135            * @return the primary key of this message boards discussion
136            */
137            public long getPrimaryKey() {
138                    return _mbDiscussion.getPrimaryKey();
139            }
140    
141            /**
142            * Sets the primary key of this message boards discussion.
143            *
144            * @param primaryKey the primary key of this message boards discussion
145            */
146            public void setPrimaryKey(long primaryKey) {
147                    _mbDiscussion.setPrimaryKey(primaryKey);
148            }
149    
150            /**
151            * Returns the uuid of this message boards discussion.
152            *
153            * @return the uuid of this message boards discussion
154            */
155            public java.lang.String getUuid() {
156                    return _mbDiscussion.getUuid();
157            }
158    
159            /**
160            * Sets the uuid of this message boards discussion.
161            *
162            * @param uuid the uuid of this message boards discussion
163            */
164            public void setUuid(java.lang.String uuid) {
165                    _mbDiscussion.setUuid(uuid);
166            }
167    
168            /**
169            * Returns the discussion ID of this message boards discussion.
170            *
171            * @return the discussion ID of this message boards discussion
172            */
173            public long getDiscussionId() {
174                    return _mbDiscussion.getDiscussionId();
175            }
176    
177            /**
178            * Sets the discussion ID of this message boards discussion.
179            *
180            * @param discussionId the discussion ID of this message boards discussion
181            */
182            public void setDiscussionId(long discussionId) {
183                    _mbDiscussion.setDiscussionId(discussionId);
184            }
185    
186            /**
187            * Returns the group ID of this message boards discussion.
188            *
189            * @return the group ID of this message boards discussion
190            */
191            public long getGroupId() {
192                    return _mbDiscussion.getGroupId();
193            }
194    
195            /**
196            * Sets the group ID of this message boards discussion.
197            *
198            * @param groupId the group ID of this message boards discussion
199            */
200            public void setGroupId(long groupId) {
201                    _mbDiscussion.setGroupId(groupId);
202            }
203    
204            /**
205            * Returns the company ID of this message boards discussion.
206            *
207            * @return the company ID of this message boards discussion
208            */
209            public long getCompanyId() {
210                    return _mbDiscussion.getCompanyId();
211            }
212    
213            /**
214            * Sets the company ID of this message boards discussion.
215            *
216            * @param companyId the company ID of this message boards discussion
217            */
218            public void setCompanyId(long companyId) {
219                    _mbDiscussion.setCompanyId(companyId);
220            }
221    
222            /**
223            * Returns the user ID of this message boards discussion.
224            *
225            * @return the user ID of this message boards discussion
226            */
227            public long getUserId() {
228                    return _mbDiscussion.getUserId();
229            }
230    
231            /**
232            * Sets the user ID of this message boards discussion.
233            *
234            * @param userId the user ID of this message boards discussion
235            */
236            public void setUserId(long userId) {
237                    _mbDiscussion.setUserId(userId);
238            }
239    
240            /**
241            * Returns the user uuid of this message boards discussion.
242            *
243            * @return the user uuid of this message boards discussion
244            * @throws SystemException if a system exception occurred
245            */
246            public java.lang.String getUserUuid()
247                    throws com.liferay.portal.kernel.exception.SystemException {
248                    return _mbDiscussion.getUserUuid();
249            }
250    
251            /**
252            * Sets the user uuid of this message boards discussion.
253            *
254            * @param userUuid the user uuid of this message boards discussion
255            */
256            public void setUserUuid(java.lang.String userUuid) {
257                    _mbDiscussion.setUserUuid(userUuid);
258            }
259    
260            /**
261            * Returns the user name of this message boards discussion.
262            *
263            * @return the user name of this message boards discussion
264            */
265            public java.lang.String getUserName() {
266                    return _mbDiscussion.getUserName();
267            }
268    
269            /**
270            * Sets the user name of this message boards discussion.
271            *
272            * @param userName the user name of this message boards discussion
273            */
274            public void setUserName(java.lang.String userName) {
275                    _mbDiscussion.setUserName(userName);
276            }
277    
278            /**
279            * Returns the create date of this message boards discussion.
280            *
281            * @return the create date of this message boards discussion
282            */
283            public java.util.Date getCreateDate() {
284                    return _mbDiscussion.getCreateDate();
285            }
286    
287            /**
288            * Sets the create date of this message boards discussion.
289            *
290            * @param createDate the create date of this message boards discussion
291            */
292            public void setCreateDate(java.util.Date createDate) {
293                    _mbDiscussion.setCreateDate(createDate);
294            }
295    
296            /**
297            * Returns the modified date of this message boards discussion.
298            *
299            * @return the modified date of this message boards discussion
300            */
301            public java.util.Date getModifiedDate() {
302                    return _mbDiscussion.getModifiedDate();
303            }
304    
305            /**
306            * Sets the modified date of this message boards discussion.
307            *
308            * @param modifiedDate the modified date of this message boards discussion
309            */
310            public void setModifiedDate(java.util.Date modifiedDate) {
311                    _mbDiscussion.setModifiedDate(modifiedDate);
312            }
313    
314            /**
315            * Returns the fully qualified class name of this message boards discussion.
316            *
317            * @return the fully qualified class name of this message boards discussion
318            */
319            public java.lang.String getClassName() {
320                    return _mbDiscussion.getClassName();
321            }
322    
323            public void setClassName(java.lang.String className) {
324                    _mbDiscussion.setClassName(className);
325            }
326    
327            /**
328            * Returns the class name ID of this message boards discussion.
329            *
330            * @return the class name ID of this message boards discussion
331            */
332            public long getClassNameId() {
333                    return _mbDiscussion.getClassNameId();
334            }
335    
336            /**
337            * Sets the class name ID of this message boards discussion.
338            *
339            * @param classNameId the class name ID of this message boards discussion
340            */
341            public void setClassNameId(long classNameId) {
342                    _mbDiscussion.setClassNameId(classNameId);
343            }
344    
345            /**
346            * Returns the class p k of this message boards discussion.
347            *
348            * @return the class p k of this message boards discussion
349            */
350            public long getClassPK() {
351                    return _mbDiscussion.getClassPK();
352            }
353    
354            /**
355            * Sets the class p k of this message boards discussion.
356            *
357            * @param classPK the class p k of this message boards discussion
358            */
359            public void setClassPK(long classPK) {
360                    _mbDiscussion.setClassPK(classPK);
361            }
362    
363            /**
364            * Returns the thread ID of this message boards discussion.
365            *
366            * @return the thread ID of this message boards discussion
367            */
368            public long getThreadId() {
369                    return _mbDiscussion.getThreadId();
370            }
371    
372            /**
373            * Sets the thread ID of this message boards discussion.
374            *
375            * @param threadId the thread ID of this message boards discussion
376            */
377            public void setThreadId(long threadId) {
378                    _mbDiscussion.setThreadId(threadId);
379            }
380    
381            public boolean isNew() {
382                    return _mbDiscussion.isNew();
383            }
384    
385            public void setNew(boolean n) {
386                    _mbDiscussion.setNew(n);
387            }
388    
389            public boolean isCachedModel() {
390                    return _mbDiscussion.isCachedModel();
391            }
392    
393            public void setCachedModel(boolean cachedModel) {
394                    _mbDiscussion.setCachedModel(cachedModel);
395            }
396    
397            public boolean isEscapedModel() {
398                    return _mbDiscussion.isEscapedModel();
399            }
400    
401            public java.io.Serializable getPrimaryKeyObj() {
402                    return _mbDiscussion.getPrimaryKeyObj();
403            }
404    
405            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
406                    _mbDiscussion.setPrimaryKeyObj(primaryKeyObj);
407            }
408    
409            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
410                    return _mbDiscussion.getExpandoBridge();
411            }
412    
413            public void setExpandoBridgeAttributes(
414                    com.liferay.portal.model.BaseModel<?> baseModel) {
415                    _mbDiscussion.setExpandoBridgeAttributes(baseModel);
416            }
417    
418            public void setExpandoBridgeAttributes(
419                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
420                    _mbDiscussion.setExpandoBridgeAttributes(expandoBridge);
421            }
422    
423            public void setExpandoBridgeAttributes(
424                    com.liferay.portal.service.ServiceContext serviceContext) {
425                    _mbDiscussion.setExpandoBridgeAttributes(serviceContext);
426            }
427    
428            @Override
429            public java.lang.Object clone() {
430                    return new MBDiscussionWrapper((MBDiscussion)_mbDiscussion.clone());
431            }
432    
433            public int compareTo(
434                    com.liferay.portlet.messageboards.model.MBDiscussion mbDiscussion) {
435                    return _mbDiscussion.compareTo(mbDiscussion);
436            }
437    
438            @Override
439            public int hashCode() {
440                    return _mbDiscussion.hashCode();
441            }
442    
443            public com.liferay.portal.model.CacheModel<com.liferay.portlet.messageboards.model.MBDiscussion> toCacheModel() {
444                    return _mbDiscussion.toCacheModel();
445            }
446    
447            public com.liferay.portlet.messageboards.model.MBDiscussion toEscapedModel() {
448                    return new MBDiscussionWrapper(_mbDiscussion.toEscapedModel());
449            }
450    
451            public com.liferay.portlet.messageboards.model.MBDiscussion toUnescapedModel() {
452                    return new MBDiscussionWrapper(_mbDiscussion.toUnescapedModel());
453            }
454    
455            @Override
456            public java.lang.String toString() {
457                    return _mbDiscussion.toString();
458            }
459    
460            public java.lang.String toXmlString() {
461                    return _mbDiscussion.toXmlString();
462            }
463    
464            public void persist()
465                    throws com.liferay.portal.kernel.exception.SystemException {
466                    _mbDiscussion.persist();
467            }
468    
469            /**
470             * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel}
471             */
472            public MBDiscussion getWrappedMBDiscussion() {
473                    return _mbDiscussion;
474            }
475    
476            public MBDiscussion getWrappedModel() {
477                    return _mbDiscussion;
478            }
479    
480            public void resetOriginalValues() {
481                    _mbDiscussion.resetOriginalValues();
482            }
483    
484            private MBDiscussion _mbDiscussion;
485    }