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