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