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