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.kernel.util.Validator;
018    import com.liferay.portal.model.ModelWrapper;
019    
020    import java.util.Date;
021    import java.util.HashMap;
022    import java.util.Map;
023    
024    /**
025     * <p>
026     * This class is a wrapper for {@link MBThreadFlag}.
027     * </p>
028     *
029     * @author    Brian Wing Shun Chan
030     * @see       MBThreadFlag
031     * @generated
032     */
033    public class MBThreadFlagWrapper implements MBThreadFlag,
034            ModelWrapper<MBThreadFlag> {
035            public MBThreadFlagWrapper(MBThreadFlag mbThreadFlag) {
036                    _mbThreadFlag = mbThreadFlag;
037            }
038    
039            public Class<?> getModelClass() {
040                    return MBThreadFlag.class;
041            }
042    
043            public String getModelClassName() {
044                    return MBThreadFlag.class.getName();
045            }
046    
047            public Map<String, Object> getModelAttributes() {
048                    Map<String, Object> attributes = new HashMap<String, Object>();
049    
050                    attributes.put("threadFlagId", getThreadFlagId());
051                    attributes.put("userId", getUserId());
052                    attributes.put("modifiedDate", getModifiedDate());
053                    attributes.put("threadId", getThreadId());
054    
055                    return attributes;
056            }
057    
058            public void setModelAttributes(Map<String, Object> attributes) {
059                    Long threadFlagId = (Long)attributes.get("threadFlagId");
060    
061                    if (threadFlagId != null) {
062                            setThreadFlagId(threadFlagId);
063                    }
064    
065                    Long userId = (Long)attributes.get("userId");
066    
067                    if (userId != null) {
068                            setUserId(userId);
069                    }
070    
071                    Date modifiedDate = (Date)attributes.get("modifiedDate");
072    
073                    if (modifiedDate != null) {
074                            setModifiedDate(modifiedDate);
075                    }
076    
077                    Long threadId = (Long)attributes.get("threadId");
078    
079                    if (threadId != null) {
080                            setThreadId(threadId);
081                    }
082            }
083    
084            /**
085            * Returns the primary key of this message boards thread flag.
086            *
087            * @return the primary key of this message boards thread flag
088            */
089            public long getPrimaryKey() {
090                    return _mbThreadFlag.getPrimaryKey();
091            }
092    
093            /**
094            * Sets the primary key of this message boards thread flag.
095            *
096            * @param primaryKey the primary key of this message boards thread flag
097            */
098            public void setPrimaryKey(long primaryKey) {
099                    _mbThreadFlag.setPrimaryKey(primaryKey);
100            }
101    
102            /**
103            * Returns the thread flag ID of this message boards thread flag.
104            *
105            * @return the thread flag ID of this message boards thread flag
106            */
107            public long getThreadFlagId() {
108                    return _mbThreadFlag.getThreadFlagId();
109            }
110    
111            /**
112            * Sets the thread flag ID of this message boards thread flag.
113            *
114            * @param threadFlagId the thread flag ID of this message boards thread flag
115            */
116            public void setThreadFlagId(long threadFlagId) {
117                    _mbThreadFlag.setThreadFlagId(threadFlagId);
118            }
119    
120            /**
121            * Returns the user ID of this message boards thread flag.
122            *
123            * @return the user ID of this message boards thread flag
124            */
125            public long getUserId() {
126                    return _mbThreadFlag.getUserId();
127            }
128    
129            /**
130            * Sets the user ID of this message boards thread flag.
131            *
132            * @param userId the user ID of this message boards thread flag
133            */
134            public void setUserId(long userId) {
135                    _mbThreadFlag.setUserId(userId);
136            }
137    
138            /**
139            * Returns the user uuid of this message boards thread flag.
140            *
141            * @return the user uuid of this message boards thread flag
142            * @throws SystemException if a system exception occurred
143            */
144            public java.lang.String getUserUuid()
145                    throws com.liferay.portal.kernel.exception.SystemException {
146                    return _mbThreadFlag.getUserUuid();
147            }
148    
149            /**
150            * Sets the user uuid of this message boards thread flag.
151            *
152            * @param userUuid the user uuid of this message boards thread flag
153            */
154            public void setUserUuid(java.lang.String userUuid) {
155                    _mbThreadFlag.setUserUuid(userUuid);
156            }
157    
158            /**
159            * Returns the modified date of this message boards thread flag.
160            *
161            * @return the modified date of this message boards thread flag
162            */
163            public java.util.Date getModifiedDate() {
164                    return _mbThreadFlag.getModifiedDate();
165            }
166    
167            /**
168            * Sets the modified date of this message boards thread flag.
169            *
170            * @param modifiedDate the modified date of this message boards thread flag
171            */
172            public void setModifiedDate(java.util.Date modifiedDate) {
173                    _mbThreadFlag.setModifiedDate(modifiedDate);
174            }
175    
176            /**
177            * Returns the thread ID of this message boards thread flag.
178            *
179            * @return the thread ID of this message boards thread flag
180            */
181            public long getThreadId() {
182                    return _mbThreadFlag.getThreadId();
183            }
184    
185            /**
186            * Sets the thread ID of this message boards thread flag.
187            *
188            * @param threadId the thread ID of this message boards thread flag
189            */
190            public void setThreadId(long threadId) {
191                    _mbThreadFlag.setThreadId(threadId);
192            }
193    
194            public boolean isNew() {
195                    return _mbThreadFlag.isNew();
196            }
197    
198            public void setNew(boolean n) {
199                    _mbThreadFlag.setNew(n);
200            }
201    
202            public boolean isCachedModel() {
203                    return _mbThreadFlag.isCachedModel();
204            }
205    
206            public void setCachedModel(boolean cachedModel) {
207                    _mbThreadFlag.setCachedModel(cachedModel);
208            }
209    
210            public boolean isEscapedModel() {
211                    return _mbThreadFlag.isEscapedModel();
212            }
213    
214            public java.io.Serializable getPrimaryKeyObj() {
215                    return _mbThreadFlag.getPrimaryKeyObj();
216            }
217    
218            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
219                    _mbThreadFlag.setPrimaryKeyObj(primaryKeyObj);
220            }
221    
222            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
223                    return _mbThreadFlag.getExpandoBridge();
224            }
225    
226            public void setExpandoBridgeAttributes(
227                    com.liferay.portal.service.ServiceContext serviceContext) {
228                    _mbThreadFlag.setExpandoBridgeAttributes(serviceContext);
229            }
230    
231            @Override
232            public java.lang.Object clone() {
233                    return new MBThreadFlagWrapper((MBThreadFlag)_mbThreadFlag.clone());
234            }
235    
236            public int compareTo(
237                    com.liferay.portlet.messageboards.model.MBThreadFlag mbThreadFlag) {
238                    return _mbThreadFlag.compareTo(mbThreadFlag);
239            }
240    
241            @Override
242            public int hashCode() {
243                    return _mbThreadFlag.hashCode();
244            }
245    
246            public com.liferay.portal.model.CacheModel<com.liferay.portlet.messageboards.model.MBThreadFlag> toCacheModel() {
247                    return _mbThreadFlag.toCacheModel();
248            }
249    
250            public com.liferay.portlet.messageboards.model.MBThreadFlag toEscapedModel() {
251                    return new MBThreadFlagWrapper(_mbThreadFlag.toEscapedModel());
252            }
253    
254            public com.liferay.portlet.messageboards.model.MBThreadFlag toUnescapedModel() {
255                    return new MBThreadFlagWrapper(_mbThreadFlag.toUnescapedModel());
256            }
257    
258            @Override
259            public java.lang.String toString() {
260                    return _mbThreadFlag.toString();
261            }
262    
263            public java.lang.String toXmlString() {
264                    return _mbThreadFlag.toXmlString();
265            }
266    
267            public void persist()
268                    throws com.liferay.portal.kernel.exception.SystemException {
269                    _mbThreadFlag.persist();
270            }
271    
272            @Override
273            public boolean equals(Object obj) {
274                    if (this == obj) {
275                            return true;
276                    }
277    
278                    if (!(obj instanceof MBThreadFlagWrapper)) {
279                            return false;
280                    }
281    
282                    MBThreadFlagWrapper mbThreadFlagWrapper = (MBThreadFlagWrapper)obj;
283    
284                    if (Validator.equals(_mbThreadFlag, mbThreadFlagWrapper._mbThreadFlag)) {
285                            return true;
286                    }
287    
288                    return false;
289            }
290    
291            /**
292             * @deprecated Renamed to {@link #getWrappedModel}
293             */
294            public MBThreadFlag getWrappedMBThreadFlag() {
295                    return _mbThreadFlag;
296            }
297    
298            public MBThreadFlag getWrappedModel() {
299                    return _mbThreadFlag;
300            }
301    
302            public void resetOriginalValues() {
303                    _mbThreadFlag.resetOriginalValues();
304            }
305    
306            private MBThreadFlag _mbThreadFlag;
307    }