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