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