001    /**
002     * Copyright (c) 2000-present 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            @Override
099            public java.lang.Object clone() {
100                    return new MBStatsUserWrapper((MBStatsUser)_mbStatsUser.clone());
101            }
102    
103            @Override
104            public int compareTo(
105                    com.liferay.portlet.messageboards.model.MBStatsUser mbStatsUser) {
106                    return _mbStatsUser.compareTo(mbStatsUser);
107            }
108    
109            @Override
110            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
111                    return _mbStatsUser.getExpandoBridge();
112            }
113    
114            /**
115            * Returns the group ID of this message boards stats user.
116            *
117            * @return the group ID of this message boards stats user
118            */
119            @Override
120            public long getGroupId() {
121                    return _mbStatsUser.getGroupId();
122            }
123    
124            /**
125            * Returns the last post date of this message boards stats user.
126            *
127            * @return the last post date of this message boards stats user
128            */
129            @Override
130            public Date getLastPostDate() {
131                    return _mbStatsUser.getLastPostDate();
132            }
133    
134            /**
135            * Returns the message count of this message boards stats user.
136            *
137            * @return the message count of this message boards stats user
138            */
139            @Override
140            public int getMessageCount() {
141                    return _mbStatsUser.getMessageCount();
142            }
143    
144            /**
145            * Returns the primary key of this message boards stats user.
146            *
147            * @return the primary key of this message boards stats user
148            */
149            @Override
150            public long getPrimaryKey() {
151                    return _mbStatsUser.getPrimaryKey();
152            }
153    
154            @Override
155            public java.io.Serializable getPrimaryKeyObj() {
156                    return _mbStatsUser.getPrimaryKeyObj();
157            }
158    
159            /**
160            * Returns the stats user ID of this message boards stats user.
161            *
162            * @return the stats user ID of this message boards stats user
163            */
164            @Override
165            public long getStatsUserId() {
166                    return _mbStatsUser.getStatsUserId();
167            }
168    
169            /**
170            * Returns the stats user uuid of this message boards stats user.
171            *
172            * @return the stats user uuid of this message boards stats user
173            */
174            @Override
175            public java.lang.String getStatsUserUuid() {
176                    return _mbStatsUser.getStatsUserUuid();
177            }
178    
179            /**
180            * Returns the user ID of this message boards stats user.
181            *
182            * @return the user ID of this message boards stats user
183            */
184            @Override
185            public long getUserId() {
186                    return _mbStatsUser.getUserId();
187            }
188    
189            /**
190            * Returns the user uuid of this message boards stats user.
191            *
192            * @return the user uuid of this message boards stats user
193            */
194            @Override
195            public java.lang.String getUserUuid() {
196                    return _mbStatsUser.getUserUuid();
197            }
198    
199            @Override
200            public int hashCode() {
201                    return _mbStatsUser.hashCode();
202            }
203    
204            @Override
205            public boolean isCachedModel() {
206                    return _mbStatsUser.isCachedModel();
207            }
208    
209            @Override
210            public boolean isEscapedModel() {
211                    return _mbStatsUser.isEscapedModel();
212            }
213    
214            @Override
215            public boolean isNew() {
216                    return _mbStatsUser.isNew();
217            }
218    
219            @Override
220            public void persist() {
221                    _mbStatsUser.persist();
222            }
223    
224            @Override
225            public void setCachedModel(boolean cachedModel) {
226                    _mbStatsUser.setCachedModel(cachedModel);
227            }
228    
229            @Override
230            public void setExpandoBridgeAttributes(
231                    com.liferay.portal.model.BaseModel<?> baseModel) {
232                    _mbStatsUser.setExpandoBridgeAttributes(baseModel);
233            }
234    
235            @Override
236            public void setExpandoBridgeAttributes(
237                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
238                    _mbStatsUser.setExpandoBridgeAttributes(expandoBridge);
239            }
240    
241            @Override
242            public void setExpandoBridgeAttributes(
243                    com.liferay.portal.service.ServiceContext serviceContext) {
244                    _mbStatsUser.setExpandoBridgeAttributes(serviceContext);
245            }
246    
247            /**
248            * Sets the group ID of this message boards stats user.
249            *
250            * @param groupId the group ID of this message boards stats user
251            */
252            @Override
253            public void setGroupId(long groupId) {
254                    _mbStatsUser.setGroupId(groupId);
255            }
256    
257            /**
258            * Sets the last post date of this message boards stats user.
259            *
260            * @param lastPostDate the last post date of this message boards stats user
261            */
262            @Override
263            public void setLastPostDate(Date lastPostDate) {
264                    _mbStatsUser.setLastPostDate(lastPostDate);
265            }
266    
267            /**
268            * Sets the message count of this message boards stats user.
269            *
270            * @param messageCount the message count of this message boards stats user
271            */
272            @Override
273            public void setMessageCount(int messageCount) {
274                    _mbStatsUser.setMessageCount(messageCount);
275            }
276    
277            @Override
278            public void setNew(boolean n) {
279                    _mbStatsUser.setNew(n);
280            }
281    
282            /**
283            * Sets the primary key of this message boards stats user.
284            *
285            * @param primaryKey the primary key of this message boards stats user
286            */
287            @Override
288            public void setPrimaryKey(long primaryKey) {
289                    _mbStatsUser.setPrimaryKey(primaryKey);
290            }
291    
292            @Override
293            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
294                    _mbStatsUser.setPrimaryKeyObj(primaryKeyObj);
295            }
296    
297            /**
298            * Sets the stats user ID of this message boards stats user.
299            *
300            * @param statsUserId the stats user ID of this message boards stats user
301            */
302            @Override
303            public void setStatsUserId(long statsUserId) {
304                    _mbStatsUser.setStatsUserId(statsUserId);
305            }
306    
307            /**
308            * Sets the stats user uuid of this message boards stats user.
309            *
310            * @param statsUserUuid the stats user uuid of this message boards stats user
311            */
312            @Override
313            public void setStatsUserUuid(java.lang.String statsUserUuid) {
314                    _mbStatsUser.setStatsUserUuid(statsUserUuid);
315            }
316    
317            /**
318            * Sets the user ID of this message boards stats user.
319            *
320            * @param userId the user ID of this message boards stats user
321            */
322            @Override
323            public void setUserId(long userId) {
324                    _mbStatsUser.setUserId(userId);
325            }
326    
327            /**
328            * Sets the user uuid of this message boards stats user.
329            *
330            * @param userUuid the user uuid of this message boards stats user
331            */
332            @Override
333            public void setUserUuid(java.lang.String userUuid) {
334                    _mbStatsUser.setUserUuid(userUuid);
335            }
336    
337            @Override
338            public com.liferay.portal.model.CacheModel<com.liferay.portlet.messageboards.model.MBStatsUser> toCacheModel() {
339                    return _mbStatsUser.toCacheModel();
340            }
341    
342            @Override
343            public com.liferay.portlet.messageboards.model.MBStatsUser toEscapedModel() {
344                    return new MBStatsUserWrapper(_mbStatsUser.toEscapedModel());
345            }
346    
347            @Override
348            public java.lang.String toString() {
349                    return _mbStatsUser.toString();
350            }
351    
352            @Override
353            public com.liferay.portlet.messageboards.model.MBStatsUser toUnescapedModel() {
354                    return new MBStatsUserWrapper(_mbStatsUser.toUnescapedModel());
355            }
356    
357            @Override
358            public java.lang.String toXmlString() {
359                    return _mbStatsUser.toXmlString();
360            }
361    
362            @Override
363            public boolean equals(Object obj) {
364                    if (this == obj) {
365                            return true;
366                    }
367    
368                    if (!(obj instanceof MBStatsUserWrapper)) {
369                            return false;
370                    }
371    
372                    MBStatsUserWrapper mbStatsUserWrapper = (MBStatsUserWrapper)obj;
373    
374                    if (Validator.equals(_mbStatsUser, mbStatsUserWrapper._mbStatsUser)) {
375                            return true;
376                    }
377    
378                    return false;
379            }
380    
381            /**
382             * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel}
383             */
384            @Deprecated
385            public MBStatsUser getWrappedMBStatsUser() {
386                    return _mbStatsUser;
387            }
388    
389            @Override
390            public MBStatsUser getWrappedModel() {
391                    return _mbStatsUser;
392            }
393    
394            @Override
395            public boolean isEntityCacheEnabled() {
396                    return _mbStatsUser.isEntityCacheEnabled();
397            }
398    
399            @Override
400            public boolean isFinderCacheEnabled() {
401                    return _mbStatsUser.isFinderCacheEnabled();
402            }
403    
404            @Override
405            public void resetOriginalValues() {
406                    _mbStatsUser.resetOriginalValues();
407            }
408    
409            private final MBStatsUser _mbStatsUser;
410    }