001    /**
002     * Copyright (c) 2000-present 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.message.boards.kernel.model;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.expando.kernel.model.ExpandoBridge;
020    
021    import com.liferay.exportimport.kernel.lar.StagedModelType;
022    
023    import com.liferay.portal.kernel.model.ModelWrapper;
024    import com.liferay.portal.kernel.service.ServiceContext;
025    import com.liferay.portal.kernel.util.Validator;
026    
027    import java.io.Serializable;
028    
029    import java.util.Date;
030    import java.util.HashMap;
031    import java.util.Map;
032    
033    /**
034     * <p>
035     * This class is a wrapper for {@link MBDiscussion}.
036     * </p>
037     *
038     * @author Brian Wing Shun Chan
039     * @see MBDiscussion
040     * @generated
041     */
042    @ProviderType
043    public class MBDiscussionWrapper implements MBDiscussion,
044            ModelWrapper<MBDiscussion> {
045            public MBDiscussionWrapper(MBDiscussion mbDiscussion) {
046                    _mbDiscussion = mbDiscussion;
047            }
048    
049            @Override
050            public Class<?> getModelClass() {
051                    return MBDiscussion.class;
052            }
053    
054            @Override
055            public String getModelClassName() {
056                    return MBDiscussion.class.getName();
057            }
058    
059            @Override
060            public Map<String, Object> getModelAttributes() {
061                    Map<String, Object> attributes = new HashMap<String, Object>();
062    
063                    attributes.put("uuid", getUuid());
064                    attributes.put("discussionId", getDiscussionId());
065                    attributes.put("groupId", getGroupId());
066                    attributes.put("companyId", getCompanyId());
067                    attributes.put("userId", getUserId());
068                    attributes.put("userName", getUserName());
069                    attributes.put("createDate", getCreateDate());
070                    attributes.put("modifiedDate", getModifiedDate());
071                    attributes.put("classNameId", getClassNameId());
072                    attributes.put("classPK", getClassPK());
073                    attributes.put("threadId", getThreadId());
074                    attributes.put("lastPublishDate", getLastPublishDate());
075    
076                    return attributes;
077            }
078    
079            @Override
080            public void setModelAttributes(Map<String, Object> attributes) {
081                    String uuid = (String)attributes.get("uuid");
082    
083                    if (uuid != null) {
084                            setUuid(uuid);
085                    }
086    
087                    Long discussionId = (Long)attributes.get("discussionId");
088    
089                    if (discussionId != null) {
090                            setDiscussionId(discussionId);
091                    }
092    
093                    Long groupId = (Long)attributes.get("groupId");
094    
095                    if (groupId != null) {
096                            setGroupId(groupId);
097                    }
098    
099                    Long companyId = (Long)attributes.get("companyId");
100    
101                    if (companyId != null) {
102                            setCompanyId(companyId);
103                    }
104    
105                    Long userId = (Long)attributes.get("userId");
106    
107                    if (userId != null) {
108                            setUserId(userId);
109                    }
110    
111                    String userName = (String)attributes.get("userName");
112    
113                    if (userName != null) {
114                            setUserName(userName);
115                    }
116    
117                    Date createDate = (Date)attributes.get("createDate");
118    
119                    if (createDate != null) {
120                            setCreateDate(createDate);
121                    }
122    
123                    Date modifiedDate = (Date)attributes.get("modifiedDate");
124    
125                    if (modifiedDate != null) {
126                            setModifiedDate(modifiedDate);
127                    }
128    
129                    Long classNameId = (Long)attributes.get("classNameId");
130    
131                    if (classNameId != null) {
132                            setClassNameId(classNameId);
133                    }
134    
135                    Long classPK = (Long)attributes.get("classPK");
136    
137                    if (classPK != null) {
138                            setClassPK(classPK);
139                    }
140    
141                    Long threadId = (Long)attributes.get("threadId");
142    
143                    if (threadId != null) {
144                            setThreadId(threadId);
145                    }
146    
147                    Date lastPublishDate = (Date)attributes.get("lastPublishDate");
148    
149                    if (lastPublishDate != null) {
150                            setLastPublishDate(lastPublishDate);
151                    }
152            }
153    
154            @Override
155            public java.lang.Object clone() {
156                    return new MBDiscussionWrapper((MBDiscussion)_mbDiscussion.clone());
157            }
158    
159            @Override
160            public int compareTo(
161                    com.liferay.message.boards.kernel.model.MBDiscussion mbDiscussion) {
162                    return _mbDiscussion.compareTo(mbDiscussion);
163            }
164    
165            /**
166            * Returns the fully qualified class name of this message boards discussion.
167            *
168            * @return the fully qualified class name of this message boards discussion
169            */
170            @Override
171            public java.lang.String getClassName() {
172                    return _mbDiscussion.getClassName();
173            }
174    
175            /**
176            * Returns the class name ID of this message boards discussion.
177            *
178            * @return the class name ID of this message boards discussion
179            */
180            @Override
181            public long getClassNameId() {
182                    return _mbDiscussion.getClassNameId();
183            }
184    
185            /**
186            * Returns the class p k of this message boards discussion.
187            *
188            * @return the class p k of this message boards discussion
189            */
190            @Override
191            public long getClassPK() {
192                    return _mbDiscussion.getClassPK();
193            }
194    
195            /**
196            * Returns the company ID of this message boards discussion.
197            *
198            * @return the company ID of this message boards discussion
199            */
200            @Override
201            public long getCompanyId() {
202                    return _mbDiscussion.getCompanyId();
203            }
204    
205            /**
206            * Returns the create date of this message boards discussion.
207            *
208            * @return the create date of this message boards discussion
209            */
210            @Override
211            public Date getCreateDate() {
212                    return _mbDiscussion.getCreateDate();
213            }
214    
215            /**
216            * Returns the discussion ID of this message boards discussion.
217            *
218            * @return the discussion ID of this message boards discussion
219            */
220            @Override
221            public long getDiscussionId() {
222                    return _mbDiscussion.getDiscussionId();
223            }
224    
225            @Override
226            public ExpandoBridge getExpandoBridge() {
227                    return _mbDiscussion.getExpandoBridge();
228            }
229    
230            /**
231            * Returns the group ID of this message boards discussion.
232            *
233            * @return the group ID of this message boards discussion
234            */
235            @Override
236            public long getGroupId() {
237                    return _mbDiscussion.getGroupId();
238            }
239    
240            /**
241            * Returns the last publish date of this message boards discussion.
242            *
243            * @return the last publish date of this message boards discussion
244            */
245            @Override
246            public Date getLastPublishDate() {
247                    return _mbDiscussion.getLastPublishDate();
248            }
249    
250            /**
251            * Returns the modified date of this message boards discussion.
252            *
253            * @return the modified date of this message boards discussion
254            */
255            @Override
256            public Date getModifiedDate() {
257                    return _mbDiscussion.getModifiedDate();
258            }
259    
260            /**
261            * Returns the primary key of this message boards discussion.
262            *
263            * @return the primary key of this message boards discussion
264            */
265            @Override
266            public long getPrimaryKey() {
267                    return _mbDiscussion.getPrimaryKey();
268            }
269    
270            @Override
271            public Serializable getPrimaryKeyObj() {
272                    return _mbDiscussion.getPrimaryKeyObj();
273            }
274    
275            /**
276            * Returns the thread ID of this message boards discussion.
277            *
278            * @return the thread ID of this message boards discussion
279            */
280            @Override
281            public long getThreadId() {
282                    return _mbDiscussion.getThreadId();
283            }
284    
285            /**
286            * Returns the user ID of this message boards discussion.
287            *
288            * @return the user ID of this message boards discussion
289            */
290            @Override
291            public long getUserId() {
292                    return _mbDiscussion.getUserId();
293            }
294    
295            /**
296            * Returns the user name of this message boards discussion.
297            *
298            * @return the user name of this message boards discussion
299            */
300            @Override
301            public java.lang.String getUserName() {
302                    return _mbDiscussion.getUserName();
303            }
304    
305            /**
306            * Returns the user uuid of this message boards discussion.
307            *
308            * @return the user uuid of this message boards discussion
309            */
310            @Override
311            public java.lang.String getUserUuid() {
312                    return _mbDiscussion.getUserUuid();
313            }
314    
315            /**
316            * Returns the uuid of this message boards discussion.
317            *
318            * @return the uuid of this message boards discussion
319            */
320            @Override
321            public java.lang.String getUuid() {
322                    return _mbDiscussion.getUuid();
323            }
324    
325            @Override
326            public int hashCode() {
327                    return _mbDiscussion.hashCode();
328            }
329    
330            @Override
331            public boolean isCachedModel() {
332                    return _mbDiscussion.isCachedModel();
333            }
334    
335            @Override
336            public boolean isEscapedModel() {
337                    return _mbDiscussion.isEscapedModel();
338            }
339    
340            @Override
341            public boolean isNew() {
342                    return _mbDiscussion.isNew();
343            }
344    
345            @Override
346            public void persist() {
347                    _mbDiscussion.persist();
348            }
349    
350            @Override
351            public void setCachedModel(boolean cachedModel) {
352                    _mbDiscussion.setCachedModel(cachedModel);
353            }
354    
355            @Override
356            public void setClassName(java.lang.String className) {
357                    _mbDiscussion.setClassName(className);
358            }
359    
360            /**
361            * Sets the class name ID of this message boards discussion.
362            *
363            * @param classNameId the class name ID of this message boards discussion
364            */
365            @Override
366            public void setClassNameId(long classNameId) {
367                    _mbDiscussion.setClassNameId(classNameId);
368            }
369    
370            /**
371            * Sets the class p k of this message boards discussion.
372            *
373            * @param classPK the class p k of this message boards discussion
374            */
375            @Override
376            public void setClassPK(long classPK) {
377                    _mbDiscussion.setClassPK(classPK);
378            }
379    
380            /**
381            * Sets the company ID of this message boards discussion.
382            *
383            * @param companyId the company ID of this message boards discussion
384            */
385            @Override
386            public void setCompanyId(long companyId) {
387                    _mbDiscussion.setCompanyId(companyId);
388            }
389    
390            /**
391            * Sets the create date of this message boards discussion.
392            *
393            * @param createDate the create date of this message boards discussion
394            */
395            @Override
396            public void setCreateDate(Date createDate) {
397                    _mbDiscussion.setCreateDate(createDate);
398            }
399    
400            /**
401            * Sets the discussion ID of this message boards discussion.
402            *
403            * @param discussionId the discussion ID of this message boards discussion
404            */
405            @Override
406            public void setDiscussionId(long discussionId) {
407                    _mbDiscussion.setDiscussionId(discussionId);
408            }
409    
410            @Override
411            public void setExpandoBridgeAttributes(
412                    com.liferay.portal.kernel.model.BaseModel<?> baseModel) {
413                    _mbDiscussion.setExpandoBridgeAttributes(baseModel);
414            }
415    
416            @Override
417            public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge) {
418                    _mbDiscussion.setExpandoBridgeAttributes(expandoBridge);
419            }
420    
421            @Override
422            public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
423                    _mbDiscussion.setExpandoBridgeAttributes(serviceContext);
424            }
425    
426            /**
427            * Sets the group ID of this message boards discussion.
428            *
429            * @param groupId the group ID of this message boards discussion
430            */
431            @Override
432            public void setGroupId(long groupId) {
433                    _mbDiscussion.setGroupId(groupId);
434            }
435    
436            /**
437            * Sets the last publish date of this message boards discussion.
438            *
439            * @param lastPublishDate the last publish date of this message boards discussion
440            */
441            @Override
442            public void setLastPublishDate(Date lastPublishDate) {
443                    _mbDiscussion.setLastPublishDate(lastPublishDate);
444            }
445    
446            /**
447            * Sets the modified date of this message boards discussion.
448            *
449            * @param modifiedDate the modified date of this message boards discussion
450            */
451            @Override
452            public void setModifiedDate(Date modifiedDate) {
453                    _mbDiscussion.setModifiedDate(modifiedDate);
454            }
455    
456            @Override
457            public void setNew(boolean n) {
458                    _mbDiscussion.setNew(n);
459            }
460    
461            /**
462            * Sets the primary key of this message boards discussion.
463            *
464            * @param primaryKey the primary key of this message boards discussion
465            */
466            @Override
467            public void setPrimaryKey(long primaryKey) {
468                    _mbDiscussion.setPrimaryKey(primaryKey);
469            }
470    
471            @Override
472            public void setPrimaryKeyObj(Serializable primaryKeyObj) {
473                    _mbDiscussion.setPrimaryKeyObj(primaryKeyObj);
474            }
475    
476            /**
477            * Sets the thread ID of this message boards discussion.
478            *
479            * @param threadId the thread ID of this message boards discussion
480            */
481            @Override
482            public void setThreadId(long threadId) {
483                    _mbDiscussion.setThreadId(threadId);
484            }
485    
486            /**
487            * Sets the user ID of this message boards discussion.
488            *
489            * @param userId the user ID of this message boards discussion
490            */
491            @Override
492            public void setUserId(long userId) {
493                    _mbDiscussion.setUserId(userId);
494            }
495    
496            /**
497            * Sets the user name of this message boards discussion.
498            *
499            * @param userName the user name of this message boards discussion
500            */
501            @Override
502            public void setUserName(java.lang.String userName) {
503                    _mbDiscussion.setUserName(userName);
504            }
505    
506            /**
507            * Sets the user uuid of this message boards discussion.
508            *
509            * @param userUuid the user uuid of this message boards discussion
510            */
511            @Override
512            public void setUserUuid(java.lang.String userUuid) {
513                    _mbDiscussion.setUserUuid(userUuid);
514            }
515    
516            /**
517            * Sets the uuid of this message boards discussion.
518            *
519            * @param uuid the uuid of this message boards discussion
520            */
521            @Override
522            public void setUuid(java.lang.String uuid) {
523                    _mbDiscussion.setUuid(uuid);
524            }
525    
526            @Override
527            public com.liferay.portal.kernel.model.CacheModel<com.liferay.message.boards.kernel.model.MBDiscussion> toCacheModel() {
528                    return _mbDiscussion.toCacheModel();
529            }
530    
531            @Override
532            public com.liferay.message.boards.kernel.model.MBDiscussion toEscapedModel() {
533                    return new MBDiscussionWrapper(_mbDiscussion.toEscapedModel());
534            }
535    
536            @Override
537            public java.lang.String toString() {
538                    return _mbDiscussion.toString();
539            }
540    
541            @Override
542            public com.liferay.message.boards.kernel.model.MBDiscussion toUnescapedModel() {
543                    return new MBDiscussionWrapper(_mbDiscussion.toUnescapedModel());
544            }
545    
546            @Override
547            public java.lang.String toXmlString() {
548                    return _mbDiscussion.toXmlString();
549            }
550    
551            @Override
552            public boolean equals(Object obj) {
553                    if (this == obj) {
554                            return true;
555                    }
556    
557                    if (!(obj instanceof MBDiscussionWrapper)) {
558                            return false;
559                    }
560    
561                    MBDiscussionWrapper mbDiscussionWrapper = (MBDiscussionWrapper)obj;
562    
563                    if (Validator.equals(_mbDiscussion, mbDiscussionWrapper._mbDiscussion)) {
564                            return true;
565                    }
566    
567                    return false;
568            }
569    
570            @Override
571            public StagedModelType getStagedModelType() {
572                    return _mbDiscussion.getStagedModelType();
573            }
574    
575            @Override
576            public MBDiscussion getWrappedModel() {
577                    return _mbDiscussion;
578            }
579    
580            @Override
581            public boolean isEntityCacheEnabled() {
582                    return _mbDiscussion.isEntityCacheEnabled();
583            }
584    
585            @Override
586            public boolean isFinderCacheEnabled() {
587                    return _mbDiscussion.isFinderCacheEnabled();
588            }
589    
590            @Override
591            public void resetOriginalValues() {
592                    _mbDiscussion.resetOriginalValues();
593            }
594    
595            private final MBDiscussion _mbDiscussion;
596    }