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