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    
026    import java.io.Serializable;
027    
028    import java.util.Date;
029    import java.util.HashMap;
030    import java.util.Map;
031    import java.util.Objects;
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 MBDiscussion toEscapedModel() {
156                    return new MBDiscussionWrapper(_mbDiscussion.toEscapedModel());
157            }
158    
159            @Override
160            public MBDiscussion toUnescapedModel() {
161                    return new MBDiscussionWrapper(_mbDiscussion.toUnescapedModel());
162            }
163    
164            @Override
165            public boolean isCachedModel() {
166                    return _mbDiscussion.isCachedModel();
167            }
168    
169            @Override
170            public boolean isEscapedModel() {
171                    return _mbDiscussion.isEscapedModel();
172            }
173    
174            @Override
175            public boolean isNew() {
176                    return _mbDiscussion.isNew();
177            }
178    
179            @Override
180            public ExpandoBridge getExpandoBridge() {
181                    return _mbDiscussion.getExpandoBridge();
182            }
183    
184            @Override
185            public com.liferay.portal.kernel.model.CacheModel<MBDiscussion> toCacheModel() {
186                    return _mbDiscussion.toCacheModel();
187            }
188    
189            @Override
190            public int compareTo(MBDiscussion mbDiscussion) {
191                    return _mbDiscussion.compareTo(mbDiscussion);
192            }
193    
194            @Override
195            public int hashCode() {
196                    return _mbDiscussion.hashCode();
197            }
198    
199            @Override
200            public Serializable getPrimaryKeyObj() {
201                    return _mbDiscussion.getPrimaryKeyObj();
202            }
203    
204            @Override
205            public java.lang.Object clone() {
206                    return new MBDiscussionWrapper((MBDiscussion)_mbDiscussion.clone());
207            }
208    
209            /**
210            * Returns the fully qualified class name of this message boards discussion.
211            *
212            * @return the fully qualified class name of this message boards discussion
213            */
214            @Override
215            public java.lang.String getClassName() {
216                    return _mbDiscussion.getClassName();
217            }
218    
219            /**
220            * Returns the user name of this message boards discussion.
221            *
222            * @return the user name of this message boards discussion
223            */
224            @Override
225            public java.lang.String getUserName() {
226                    return _mbDiscussion.getUserName();
227            }
228    
229            /**
230            * Returns the user uuid of this message boards discussion.
231            *
232            * @return the user uuid of this message boards discussion
233            */
234            @Override
235            public java.lang.String getUserUuid() {
236                    return _mbDiscussion.getUserUuid();
237            }
238    
239            /**
240            * Returns the uuid of this message boards discussion.
241            *
242            * @return the uuid of this message boards discussion
243            */
244            @Override
245            public java.lang.String getUuid() {
246                    return _mbDiscussion.getUuid();
247            }
248    
249            @Override
250            public java.lang.String toString() {
251                    return _mbDiscussion.toString();
252            }
253    
254            @Override
255            public java.lang.String toXmlString() {
256                    return _mbDiscussion.toXmlString();
257            }
258    
259            /**
260            * Returns the create date of this message boards discussion.
261            *
262            * @return the create date of this message boards discussion
263            */
264            @Override
265            public Date getCreateDate() {
266                    return _mbDiscussion.getCreateDate();
267            }
268    
269            /**
270            * Returns the last publish date of this message boards discussion.
271            *
272            * @return the last publish date of this message boards discussion
273            */
274            @Override
275            public Date getLastPublishDate() {
276                    return _mbDiscussion.getLastPublishDate();
277            }
278    
279            /**
280            * Returns the modified date of this message boards discussion.
281            *
282            * @return the modified date of this message boards discussion
283            */
284            @Override
285            public Date getModifiedDate() {
286                    return _mbDiscussion.getModifiedDate();
287            }
288    
289            /**
290            * Returns the class name ID of this message boards discussion.
291            *
292            * @return the class name ID of this message boards discussion
293            */
294            @Override
295            public long getClassNameId() {
296                    return _mbDiscussion.getClassNameId();
297            }
298    
299            /**
300            * Returns the class p k of this message boards discussion.
301            *
302            * @return the class p k of this message boards discussion
303            */
304            @Override
305            public long getClassPK() {
306                    return _mbDiscussion.getClassPK();
307            }
308    
309            /**
310            * Returns the company ID of this message boards discussion.
311            *
312            * @return the company ID of this message boards discussion
313            */
314            @Override
315            public long getCompanyId() {
316                    return _mbDiscussion.getCompanyId();
317            }
318    
319            /**
320            * Returns the discussion ID of this message boards discussion.
321            *
322            * @return the discussion ID of this message boards discussion
323            */
324            @Override
325            public long getDiscussionId() {
326                    return _mbDiscussion.getDiscussionId();
327            }
328    
329            /**
330            * Returns the group ID of this message boards discussion.
331            *
332            * @return the group ID of this message boards discussion
333            */
334            @Override
335            public long getGroupId() {
336                    return _mbDiscussion.getGroupId();
337            }
338    
339            /**
340            * Returns the primary key of this message boards discussion.
341            *
342            * @return the primary key of this message boards discussion
343            */
344            @Override
345            public long getPrimaryKey() {
346                    return _mbDiscussion.getPrimaryKey();
347            }
348    
349            /**
350            * Returns the thread ID of this message boards discussion.
351            *
352            * @return the thread ID of this message boards discussion
353            */
354            @Override
355            public long getThreadId() {
356                    return _mbDiscussion.getThreadId();
357            }
358    
359            /**
360            * Returns the user ID of this message boards discussion.
361            *
362            * @return the user ID of this message boards discussion
363            */
364            @Override
365            public long getUserId() {
366                    return _mbDiscussion.getUserId();
367            }
368    
369            @Override
370            public void persist() {
371                    _mbDiscussion.persist();
372            }
373    
374            @Override
375            public void setCachedModel(boolean cachedModel) {
376                    _mbDiscussion.setCachedModel(cachedModel);
377            }
378    
379            @Override
380            public void setClassName(java.lang.String className) {
381                    _mbDiscussion.setClassName(className);
382            }
383    
384            /**
385            * Sets the class name ID of this message boards discussion.
386            *
387            * @param classNameId the class name ID of this message boards discussion
388            */
389            @Override
390            public void setClassNameId(long classNameId) {
391                    _mbDiscussion.setClassNameId(classNameId);
392            }
393    
394            /**
395            * Sets the class p k of this message boards discussion.
396            *
397            * @param classPK the class p k of this message boards discussion
398            */
399            @Override
400            public void setClassPK(long classPK) {
401                    _mbDiscussion.setClassPK(classPK);
402            }
403    
404            /**
405            * Sets the company ID of this message boards discussion.
406            *
407            * @param companyId the company ID of this message boards discussion
408            */
409            @Override
410            public void setCompanyId(long companyId) {
411                    _mbDiscussion.setCompanyId(companyId);
412            }
413    
414            /**
415            * Sets the create date of this message boards discussion.
416            *
417            * @param createDate the create date of this message boards discussion
418            */
419            @Override
420            public void setCreateDate(Date createDate) {
421                    _mbDiscussion.setCreateDate(createDate);
422            }
423    
424            /**
425            * Sets the discussion ID of this message boards discussion.
426            *
427            * @param discussionId the discussion ID of this message boards discussion
428            */
429            @Override
430            public void setDiscussionId(long discussionId) {
431                    _mbDiscussion.setDiscussionId(discussionId);
432            }
433    
434            @Override
435            public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge) {
436                    _mbDiscussion.setExpandoBridgeAttributes(expandoBridge);
437            }
438    
439            @Override
440            public void setExpandoBridgeAttributes(
441                    com.liferay.portal.kernel.model.BaseModel<?> baseModel) {
442                    _mbDiscussion.setExpandoBridgeAttributes(baseModel);
443            }
444    
445            @Override
446            public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
447                    _mbDiscussion.setExpandoBridgeAttributes(serviceContext);
448            }
449    
450            /**
451            * Sets the group ID of this message boards discussion.
452            *
453            * @param groupId the group ID of this message boards discussion
454            */
455            @Override
456            public void setGroupId(long groupId) {
457                    _mbDiscussion.setGroupId(groupId);
458            }
459    
460            /**
461            * Sets the last publish date of this message boards discussion.
462            *
463            * @param lastPublishDate the last publish date of this message boards discussion
464            */
465            @Override
466            public void setLastPublishDate(Date lastPublishDate) {
467                    _mbDiscussion.setLastPublishDate(lastPublishDate);
468            }
469    
470            /**
471            * Sets the modified date of this message boards discussion.
472            *
473            * @param modifiedDate the modified date of this message boards discussion
474            */
475            @Override
476            public void setModifiedDate(Date modifiedDate) {
477                    _mbDiscussion.setModifiedDate(modifiedDate);
478            }
479    
480            @Override
481            public void setNew(boolean n) {
482                    _mbDiscussion.setNew(n);
483            }
484    
485            /**
486            * Sets the primary key of this message boards discussion.
487            *
488            * @param primaryKey the primary key of this message boards discussion
489            */
490            @Override
491            public void setPrimaryKey(long primaryKey) {
492                    _mbDiscussion.setPrimaryKey(primaryKey);
493            }
494    
495            @Override
496            public void setPrimaryKeyObj(Serializable primaryKeyObj) {
497                    _mbDiscussion.setPrimaryKeyObj(primaryKeyObj);
498            }
499    
500            /**
501            * Sets the thread ID of this message boards discussion.
502            *
503            * @param threadId the thread ID of this message boards discussion
504            */
505            @Override
506            public void setThreadId(long threadId) {
507                    _mbDiscussion.setThreadId(threadId);
508            }
509    
510            /**
511            * Sets the user ID of this message boards discussion.
512            *
513            * @param userId the user ID of this message boards discussion
514            */
515            @Override
516            public void setUserId(long userId) {
517                    _mbDiscussion.setUserId(userId);
518            }
519    
520            /**
521            * Sets the user name of this message boards discussion.
522            *
523            * @param userName the user name of this message boards discussion
524            */
525            @Override
526            public void setUserName(java.lang.String userName) {
527                    _mbDiscussion.setUserName(userName);
528            }
529    
530            /**
531            * Sets the user uuid of this message boards discussion.
532            *
533            * @param userUuid the user uuid of this message boards discussion
534            */
535            @Override
536            public void setUserUuid(java.lang.String userUuid) {
537                    _mbDiscussion.setUserUuid(userUuid);
538            }
539    
540            /**
541            * Sets the uuid of this message boards discussion.
542            *
543            * @param uuid the uuid of this message boards discussion
544            */
545            @Override
546            public void setUuid(java.lang.String uuid) {
547                    _mbDiscussion.setUuid(uuid);
548            }
549    
550            @Override
551            public boolean equals(Object obj) {
552                    if (this == obj) {
553                            return true;
554                    }
555    
556                    if (!(obj instanceof MBDiscussionWrapper)) {
557                            return false;
558                    }
559    
560                    MBDiscussionWrapper mbDiscussionWrapper = (MBDiscussionWrapper)obj;
561    
562                    if (Objects.equals(_mbDiscussion, mbDiscussionWrapper._mbDiscussion)) {
563                            return true;
564                    }
565    
566                    return false;
567            }
568    
569            @Override
570            public StagedModelType getStagedModelType() {
571                    return _mbDiscussion.getStagedModelType();
572            }
573    
574            @Override
575            public MBDiscussion getWrappedModel() {
576                    return _mbDiscussion;
577            }
578    
579            @Override
580            public boolean isEntityCacheEnabled() {
581                    return _mbDiscussion.isEntityCacheEnabled();
582            }
583    
584            @Override
585            public boolean isFinderCacheEnabled() {
586                    return _mbDiscussion.isFinderCacheEnabled();
587            }
588    
589            @Override
590            public void resetOriginalValues() {
591                    _mbDiscussion.resetOriginalValues();
592            }
593    
594            private final MBDiscussion _mbDiscussion;
595    }