001
014
015 package com.liferay.portlet.ratings.model;
016
017 import com.liferay.portal.model.ModelWrapper;
018
019 import java.util.HashMap;
020 import java.util.Map;
021
022
031 public class RatingsStatsWrapper implements RatingsStats,
032 ModelWrapper<RatingsStats> {
033 public RatingsStatsWrapper(RatingsStats ratingsStats) {
034 _ratingsStats = ratingsStats;
035 }
036
037 public Class<?> getModelClass() {
038 return RatingsStats.class;
039 }
040
041 public String getModelClassName() {
042 return RatingsStats.class.getName();
043 }
044
045 public Map<String, Object> getModelAttributes() {
046 Map<String, Object> attributes = new HashMap<String, Object>();
047
048 attributes.put("statsId", getStatsId());
049 attributes.put("classNameId", getClassNameId());
050 attributes.put("classPK", getClassPK());
051 attributes.put("totalEntries", getTotalEntries());
052 attributes.put("totalScore", getTotalScore());
053 attributes.put("averageScore", getAverageScore());
054
055 return attributes;
056 }
057
058 public void setModelAttributes(Map<String, Object> attributes) {
059 Long statsId = (Long)attributes.get("statsId");
060
061 if (statsId != null) {
062 setStatsId(statsId);
063 }
064
065 Long classNameId = (Long)attributes.get("classNameId");
066
067 if (classNameId != null) {
068 setClassNameId(classNameId);
069 }
070
071 Long classPK = (Long)attributes.get("classPK");
072
073 if (classPK != null) {
074 setClassPK(classPK);
075 }
076
077 Integer totalEntries = (Integer)attributes.get("totalEntries");
078
079 if (totalEntries != null) {
080 setTotalEntries(totalEntries);
081 }
082
083 Double totalScore = (Double)attributes.get("totalScore");
084
085 if (totalScore != null) {
086 setTotalScore(totalScore);
087 }
088
089 Double averageScore = (Double)attributes.get("averageScore");
090
091 if (averageScore != null) {
092 setAverageScore(averageScore);
093 }
094 }
095
096
101 public long getPrimaryKey() {
102 return _ratingsStats.getPrimaryKey();
103 }
104
105
110 public void setPrimaryKey(long primaryKey) {
111 _ratingsStats.setPrimaryKey(primaryKey);
112 }
113
114
119 public long getStatsId() {
120 return _ratingsStats.getStatsId();
121 }
122
123
128 public void setStatsId(long statsId) {
129 _ratingsStats.setStatsId(statsId);
130 }
131
132
137 public java.lang.String getClassName() {
138 return _ratingsStats.getClassName();
139 }
140
141 public void setClassName(java.lang.String className) {
142 _ratingsStats.setClassName(className);
143 }
144
145
150 public long getClassNameId() {
151 return _ratingsStats.getClassNameId();
152 }
153
154
159 public void setClassNameId(long classNameId) {
160 _ratingsStats.setClassNameId(classNameId);
161 }
162
163
168 public long getClassPK() {
169 return _ratingsStats.getClassPK();
170 }
171
172
177 public void setClassPK(long classPK) {
178 _ratingsStats.setClassPK(classPK);
179 }
180
181
186 public int getTotalEntries() {
187 return _ratingsStats.getTotalEntries();
188 }
189
190
195 public void setTotalEntries(int totalEntries) {
196 _ratingsStats.setTotalEntries(totalEntries);
197 }
198
199
204 public double getTotalScore() {
205 return _ratingsStats.getTotalScore();
206 }
207
208
213 public void setTotalScore(double totalScore) {
214 _ratingsStats.setTotalScore(totalScore);
215 }
216
217
222 public double getAverageScore() {
223 return _ratingsStats.getAverageScore();
224 }
225
226
231 public void setAverageScore(double averageScore) {
232 _ratingsStats.setAverageScore(averageScore);
233 }
234
235 public boolean isNew() {
236 return _ratingsStats.isNew();
237 }
238
239 public void setNew(boolean n) {
240 _ratingsStats.setNew(n);
241 }
242
243 public boolean isCachedModel() {
244 return _ratingsStats.isCachedModel();
245 }
246
247 public void setCachedModel(boolean cachedModel) {
248 _ratingsStats.setCachedModel(cachedModel);
249 }
250
251 public boolean isEscapedModel() {
252 return _ratingsStats.isEscapedModel();
253 }
254
255 public java.io.Serializable getPrimaryKeyObj() {
256 return _ratingsStats.getPrimaryKeyObj();
257 }
258
259 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
260 _ratingsStats.setPrimaryKeyObj(primaryKeyObj);
261 }
262
263 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
264 return _ratingsStats.getExpandoBridge();
265 }
266
267 public void setExpandoBridgeAttributes(
268 com.liferay.portal.service.ServiceContext serviceContext) {
269 _ratingsStats.setExpandoBridgeAttributes(serviceContext);
270 }
271
272 @Override
273 public java.lang.Object clone() {
274 return new RatingsStatsWrapper((RatingsStats)_ratingsStats.clone());
275 }
276
277 public int compareTo(
278 com.liferay.portlet.ratings.model.RatingsStats ratingsStats) {
279 return _ratingsStats.compareTo(ratingsStats);
280 }
281
282 @Override
283 public int hashCode() {
284 return _ratingsStats.hashCode();
285 }
286
287 public com.liferay.portal.model.CacheModel<com.liferay.portlet.ratings.model.RatingsStats> toCacheModel() {
288 return _ratingsStats.toCacheModel();
289 }
290
291 public com.liferay.portlet.ratings.model.RatingsStats toEscapedModel() {
292 return new RatingsStatsWrapper(_ratingsStats.toEscapedModel());
293 }
294
295 public com.liferay.portlet.ratings.model.RatingsStats toUnescapedModel() {
296 return new RatingsStatsWrapper(_ratingsStats.toUnescapedModel());
297 }
298
299 @Override
300 public java.lang.String toString() {
301 return _ratingsStats.toString();
302 }
303
304 public java.lang.String toXmlString() {
305 return _ratingsStats.toXmlString();
306 }
307
308 public void persist()
309 throws com.liferay.portal.kernel.exception.SystemException {
310 _ratingsStats.persist();
311 }
312
313
316 public RatingsStats getWrappedRatingsStats() {
317 return _ratingsStats;
318 }
319
320 public RatingsStats getWrappedModel() {
321 return _ratingsStats;
322 }
323
324 public void resetOriginalValues() {
325 _ratingsStats.resetOriginalValues();
326 }
327
328 private RatingsStats _ratingsStats;
329 }