001
014
015 package com.liferay.portlet.ratings.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
033 public class RatingsEntryWrapper implements RatingsEntry,
034 ModelWrapper<RatingsEntry> {
035 public RatingsEntryWrapper(RatingsEntry ratingsEntry) {
036 _ratingsEntry = ratingsEntry;
037 }
038
039 public Class<?> getModelClass() {
040 return RatingsEntry.class;
041 }
042
043 public String getModelClassName() {
044 return RatingsEntry.class.getName();
045 }
046
047 public Map<String, Object> getModelAttributes() {
048 Map<String, Object> attributes = new HashMap<String, Object>();
049
050 attributes.put("entryId", getEntryId());
051 attributes.put("companyId", getCompanyId());
052 attributes.put("userId", getUserId());
053 attributes.put("userName", getUserName());
054 attributes.put("createDate", getCreateDate());
055 attributes.put("modifiedDate", getModifiedDate());
056 attributes.put("classNameId", getClassNameId());
057 attributes.put("classPK", getClassPK());
058 attributes.put("score", getScore());
059
060 return attributes;
061 }
062
063 public void setModelAttributes(Map<String, Object> attributes) {
064 Long entryId = (Long)attributes.get("entryId");
065
066 if (entryId != null) {
067 setEntryId(entryId);
068 }
069
070 Long companyId = (Long)attributes.get("companyId");
071
072 if (companyId != null) {
073 setCompanyId(companyId);
074 }
075
076 Long userId = (Long)attributes.get("userId");
077
078 if (userId != null) {
079 setUserId(userId);
080 }
081
082 String userName = (String)attributes.get("userName");
083
084 if (userName != null) {
085 setUserName(userName);
086 }
087
088 Date createDate = (Date)attributes.get("createDate");
089
090 if (createDate != null) {
091 setCreateDate(createDate);
092 }
093
094 Date modifiedDate = (Date)attributes.get("modifiedDate");
095
096 if (modifiedDate != null) {
097 setModifiedDate(modifiedDate);
098 }
099
100 Long classNameId = (Long)attributes.get("classNameId");
101
102 if (classNameId != null) {
103 setClassNameId(classNameId);
104 }
105
106 Long classPK = (Long)attributes.get("classPK");
107
108 if (classPK != null) {
109 setClassPK(classPK);
110 }
111
112 Double score = (Double)attributes.get("score");
113
114 if (score != null) {
115 setScore(score);
116 }
117 }
118
119
124 public long getPrimaryKey() {
125 return _ratingsEntry.getPrimaryKey();
126 }
127
128
133 public void setPrimaryKey(long primaryKey) {
134 _ratingsEntry.setPrimaryKey(primaryKey);
135 }
136
137
142 public long getEntryId() {
143 return _ratingsEntry.getEntryId();
144 }
145
146
151 public void setEntryId(long entryId) {
152 _ratingsEntry.setEntryId(entryId);
153 }
154
155
160 public long getCompanyId() {
161 return _ratingsEntry.getCompanyId();
162 }
163
164
169 public void setCompanyId(long companyId) {
170 _ratingsEntry.setCompanyId(companyId);
171 }
172
173
178 public long getUserId() {
179 return _ratingsEntry.getUserId();
180 }
181
182
187 public void setUserId(long userId) {
188 _ratingsEntry.setUserId(userId);
189 }
190
191
197 public java.lang.String getUserUuid()
198 throws com.liferay.portal.kernel.exception.SystemException {
199 return _ratingsEntry.getUserUuid();
200 }
201
202
207 public void setUserUuid(java.lang.String userUuid) {
208 _ratingsEntry.setUserUuid(userUuid);
209 }
210
211
216 public java.lang.String getUserName() {
217 return _ratingsEntry.getUserName();
218 }
219
220
225 public void setUserName(java.lang.String userName) {
226 _ratingsEntry.setUserName(userName);
227 }
228
229
234 public java.util.Date getCreateDate() {
235 return _ratingsEntry.getCreateDate();
236 }
237
238
243 public void setCreateDate(java.util.Date createDate) {
244 _ratingsEntry.setCreateDate(createDate);
245 }
246
247
252 public java.util.Date getModifiedDate() {
253 return _ratingsEntry.getModifiedDate();
254 }
255
256
261 public void setModifiedDate(java.util.Date modifiedDate) {
262 _ratingsEntry.setModifiedDate(modifiedDate);
263 }
264
265
270 public java.lang.String getClassName() {
271 return _ratingsEntry.getClassName();
272 }
273
274 public void setClassName(java.lang.String className) {
275 _ratingsEntry.setClassName(className);
276 }
277
278
283 public long getClassNameId() {
284 return _ratingsEntry.getClassNameId();
285 }
286
287
292 public void setClassNameId(long classNameId) {
293 _ratingsEntry.setClassNameId(classNameId);
294 }
295
296
301 public long getClassPK() {
302 return _ratingsEntry.getClassPK();
303 }
304
305
310 public void setClassPK(long classPK) {
311 _ratingsEntry.setClassPK(classPK);
312 }
313
314
319 public double getScore() {
320 return _ratingsEntry.getScore();
321 }
322
323
328 public void setScore(double score) {
329 _ratingsEntry.setScore(score);
330 }
331
332 public boolean isNew() {
333 return _ratingsEntry.isNew();
334 }
335
336 public void setNew(boolean n) {
337 _ratingsEntry.setNew(n);
338 }
339
340 public boolean isCachedModel() {
341 return _ratingsEntry.isCachedModel();
342 }
343
344 public void setCachedModel(boolean cachedModel) {
345 _ratingsEntry.setCachedModel(cachedModel);
346 }
347
348 public boolean isEscapedModel() {
349 return _ratingsEntry.isEscapedModel();
350 }
351
352 public java.io.Serializable getPrimaryKeyObj() {
353 return _ratingsEntry.getPrimaryKeyObj();
354 }
355
356 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
357 _ratingsEntry.setPrimaryKeyObj(primaryKeyObj);
358 }
359
360 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
361 return _ratingsEntry.getExpandoBridge();
362 }
363
364 public void setExpandoBridgeAttributes(
365 com.liferay.portal.service.ServiceContext serviceContext) {
366 _ratingsEntry.setExpandoBridgeAttributes(serviceContext);
367 }
368
369 @Override
370 public java.lang.Object clone() {
371 return new RatingsEntryWrapper((RatingsEntry)_ratingsEntry.clone());
372 }
373
374 public int compareTo(
375 com.liferay.portlet.ratings.model.RatingsEntry ratingsEntry) {
376 return _ratingsEntry.compareTo(ratingsEntry);
377 }
378
379 @Override
380 public int hashCode() {
381 return _ratingsEntry.hashCode();
382 }
383
384 public com.liferay.portal.model.CacheModel<com.liferay.portlet.ratings.model.RatingsEntry> toCacheModel() {
385 return _ratingsEntry.toCacheModel();
386 }
387
388 public com.liferay.portlet.ratings.model.RatingsEntry toEscapedModel() {
389 return new RatingsEntryWrapper(_ratingsEntry.toEscapedModel());
390 }
391
392 public com.liferay.portlet.ratings.model.RatingsEntry toUnescapedModel() {
393 return new RatingsEntryWrapper(_ratingsEntry.toUnescapedModel());
394 }
395
396 @Override
397 public java.lang.String toString() {
398 return _ratingsEntry.toString();
399 }
400
401 public java.lang.String toXmlString() {
402 return _ratingsEntry.toXmlString();
403 }
404
405 public void persist()
406 throws com.liferay.portal.kernel.exception.SystemException {
407 _ratingsEntry.persist();
408 }
409
410 @Override
411 public boolean equals(Object obj) {
412 if (this == obj) {
413 return true;
414 }
415
416 if (!(obj instanceof RatingsEntryWrapper)) {
417 return false;
418 }
419
420 RatingsEntryWrapper ratingsEntryWrapper = (RatingsEntryWrapper)obj;
421
422 if (Validator.equals(_ratingsEntry, ratingsEntryWrapper._ratingsEntry)) {
423 return true;
424 }
425
426 return false;
427 }
428
429
432 public RatingsEntry getWrappedRatingsEntry() {
433 return _ratingsEntry;
434 }
435
436 public RatingsEntry getWrappedModel() {
437 return _ratingsEntry;
438 }
439
440 public void resetOriginalValues() {
441 _ratingsEntry.resetOriginalValues();
442 }
443
444 private RatingsEntry _ratingsEntry;
445 }