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