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