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