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