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