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