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 MBStatsUser}.
026     * </p>
027     *
028     * @author    Brian Wing Shun Chan
029     * @see       MBStatsUser
030     * @generated
031     */
032    public class MBStatsUserWrapper implements MBStatsUser,
033            ModelWrapper<MBStatsUser> {
034            public MBStatsUserWrapper(MBStatsUser mbStatsUser) {
035                    _mbStatsUser = mbStatsUser;
036            }
037    
038            public Class<?> getModelClass() {
039                    return MBStatsUser.class;
040            }
041    
042            public String getModelClassName() {
043                    return MBStatsUser.class.getName();
044            }
045    
046            public Map<String, Object> getModelAttributes() {
047                    Map<String, Object> attributes = new HashMap<String, Object>();
048    
049                    attributes.put("statsUserId", getStatsUserId());
050                    attributes.put("groupId", getGroupId());
051                    attributes.put("userId", getUserId());
052                    attributes.put("messageCount", getMessageCount());
053                    attributes.put("lastPostDate", getLastPostDate());
054    
055                    return attributes;
056            }
057    
058            public void setModelAttributes(Map<String, Object> attributes) {
059                    Long statsUserId = (Long)attributes.get("statsUserId");
060    
061                    if (statsUserId != null) {
062                            setStatsUserId(statsUserId);
063                    }
064    
065                    Long groupId = (Long)attributes.get("groupId");
066    
067                    if (groupId != null) {
068                            setGroupId(groupId);
069                    }
070    
071                    Long userId = (Long)attributes.get("userId");
072    
073                    if (userId != null) {
074                            setUserId(userId);
075                    }
076    
077                    Integer messageCount = (Integer)attributes.get("messageCount");
078    
079                    if (messageCount != null) {
080                            setMessageCount(messageCount);
081                    }
082    
083                    Date lastPostDate = (Date)attributes.get("lastPostDate");
084    
085                    if (lastPostDate != null) {
086                            setLastPostDate(lastPostDate);
087                    }
088            }
089    
090            /**
091            * Returns the primary key of this message boards stats user.
092            *
093            * @return the primary key of this message boards stats user
094            */
095            public long getPrimaryKey() {
096                    return _mbStatsUser.getPrimaryKey();
097            }
098    
099            /**
100            * Sets the primary key of this message boards stats user.
101            *
102            * @param primaryKey the primary key of this message boards stats user
103            */
104            public void setPrimaryKey(long primaryKey) {
105                    _mbStatsUser.setPrimaryKey(primaryKey);
106            }
107    
108            /**
109            * Returns the stats user ID of this message boards stats user.
110            *
111            * @return the stats user ID of this message boards stats user
112            */
113            public long getStatsUserId() {
114                    return _mbStatsUser.getStatsUserId();
115            }
116    
117            /**
118            * Sets the stats user ID of this message boards stats user.
119            *
120            * @param statsUserId the stats user ID of this message boards stats user
121            */
122            public void setStatsUserId(long statsUserId) {
123                    _mbStatsUser.setStatsUserId(statsUserId);
124            }
125    
126            /**
127            * Returns the stats user uuid of this message boards stats user.
128            *
129            * @return the stats user uuid of this message boards stats user
130            * @throws SystemException if a system exception occurred
131            */
132            public java.lang.String getStatsUserUuid()
133                    throws com.liferay.portal.kernel.exception.SystemException {
134                    return _mbStatsUser.getStatsUserUuid();
135            }
136    
137            /**
138            * Sets the stats user uuid of this message boards stats user.
139            *
140            * @param statsUserUuid the stats user uuid of this message boards stats user
141            */
142            public void setStatsUserUuid(java.lang.String statsUserUuid) {
143                    _mbStatsUser.setStatsUserUuid(statsUserUuid);
144            }
145    
146            /**
147            * Returns the group ID of this message boards stats user.
148            *
149            * @return the group ID of this message boards stats user
150            */
151            public long getGroupId() {
152                    return _mbStatsUser.getGroupId();
153            }
154    
155            /**
156            * Sets the group ID of this message boards stats user.
157            *
158            * @param groupId the group ID of this message boards stats user
159            */
160            public void setGroupId(long groupId) {
161                    _mbStatsUser.setGroupId(groupId);
162            }
163    
164            /**
165            * Returns the user ID of this message boards stats user.
166            *
167            * @return the user ID of this message boards stats user
168            */
169            public long getUserId() {
170                    return _mbStatsUser.getUserId();
171            }
172    
173            /**
174            * Sets the user ID of this message boards stats user.
175            *
176            * @param userId the user ID of this message boards stats user
177            */
178            public void setUserId(long userId) {
179                    _mbStatsUser.setUserId(userId);
180            }
181    
182            /**
183            * Returns the user uuid of this message boards stats user.
184            *
185            * @return the user uuid of this message boards stats user
186            * @throws SystemException if a system exception occurred
187            */
188            public java.lang.String getUserUuid()
189                    throws com.liferay.portal.kernel.exception.SystemException {
190                    return _mbStatsUser.getUserUuid();
191            }
192    
193            /**
194            * Sets the user uuid of this message boards stats user.
195            *
196            * @param userUuid the user uuid of this message boards stats user
197            */
198            public void setUserUuid(java.lang.String userUuid) {
199                    _mbStatsUser.setUserUuid(userUuid);
200            }
201    
202            /**
203            * Returns the message count of this message boards stats user.
204            *
205            * @return the message count of this message boards stats user
206            */
207            public int getMessageCount() {
208                    return _mbStatsUser.getMessageCount();
209            }
210    
211            /**
212            * Sets the message count of this message boards stats user.
213            *
214            * @param messageCount the message count of this message boards stats user
215            */
216            public void setMessageCount(int messageCount) {
217                    _mbStatsUser.setMessageCount(messageCount);
218            }
219    
220            /**
221            * Returns the last post date of this message boards stats user.
222            *
223            * @return the last post date of this message boards stats user
224            */
225            public java.util.Date getLastPostDate() {
226                    return _mbStatsUser.getLastPostDate();
227            }
228    
229            /**
230            * Sets the last post date of this message boards stats user.
231            *
232            * @param lastPostDate the last post date of this message boards stats user
233            */
234            public void setLastPostDate(java.util.Date lastPostDate) {
235                    _mbStatsUser.setLastPostDate(lastPostDate);
236            }
237    
238            public boolean isNew() {
239                    return _mbStatsUser.isNew();
240            }
241    
242            public void setNew(boolean n) {
243                    _mbStatsUser.setNew(n);
244            }
245    
246            public boolean isCachedModel() {
247                    return _mbStatsUser.isCachedModel();
248            }
249    
250            public void setCachedModel(boolean cachedModel) {
251                    _mbStatsUser.setCachedModel(cachedModel);
252            }
253    
254            public boolean isEscapedModel() {
255                    return _mbStatsUser.isEscapedModel();
256            }
257    
258            public java.io.Serializable getPrimaryKeyObj() {
259                    return _mbStatsUser.getPrimaryKeyObj();
260            }
261    
262            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
263                    _mbStatsUser.setPrimaryKeyObj(primaryKeyObj);
264            }
265    
266            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
267                    return _mbStatsUser.getExpandoBridge();
268            }
269    
270            public void setExpandoBridgeAttributes(
271                    com.liferay.portal.model.BaseModel<?> baseModel) {
272                    _mbStatsUser.setExpandoBridgeAttributes(baseModel);
273            }
274    
275            public void setExpandoBridgeAttributes(
276                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
277                    _mbStatsUser.setExpandoBridgeAttributes(expandoBridge);
278            }
279    
280            public void setExpandoBridgeAttributes(
281                    com.liferay.portal.service.ServiceContext serviceContext) {
282                    _mbStatsUser.setExpandoBridgeAttributes(serviceContext);
283            }
284    
285            @Override
286            public java.lang.Object clone() {
287                    return new MBStatsUserWrapper((MBStatsUser)_mbStatsUser.clone());
288            }
289    
290            public int compareTo(
291                    com.liferay.portlet.messageboards.model.MBStatsUser mbStatsUser) {
292                    return _mbStatsUser.compareTo(mbStatsUser);
293            }
294    
295            @Override
296            public int hashCode() {
297                    return _mbStatsUser.hashCode();
298            }
299    
300            public com.liferay.portal.model.CacheModel<com.liferay.portlet.messageboards.model.MBStatsUser> toCacheModel() {
301                    return _mbStatsUser.toCacheModel();
302            }
303    
304            public com.liferay.portlet.messageboards.model.MBStatsUser toEscapedModel() {
305                    return new MBStatsUserWrapper(_mbStatsUser.toEscapedModel());
306            }
307    
308            public com.liferay.portlet.messageboards.model.MBStatsUser toUnescapedModel() {
309                    return new MBStatsUserWrapper(_mbStatsUser.toUnescapedModel());
310            }
311    
312            @Override
313            public java.lang.String toString() {
314                    return _mbStatsUser.toString();
315            }
316    
317            public java.lang.String toXmlString() {
318                    return _mbStatsUser.toXmlString();
319            }
320    
321            public void persist()
322                    throws com.liferay.portal.kernel.exception.SystemException {
323                    _mbStatsUser.persist();
324            }
325    
326            /**
327             * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel}
328             */
329            public MBStatsUser getWrappedMBStatsUser() {
330                    return _mbStatsUser;
331            }
332    
333            public MBStatsUser getWrappedModel() {
334                    return _mbStatsUser;
335            }
336    
337            public void resetOriginalValues() {
338                    _mbStatsUser.resetOriginalValues();
339            }
340    
341            private MBStatsUser _mbStatsUser;
342    }