001
014
015 package com.liferay.portlet.ratings.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
035 @ProviderType
036 public class RatingsEntryWrapper implements RatingsEntry,
037 ModelWrapper<RatingsEntry> {
038 public RatingsEntryWrapper(RatingsEntry ratingsEntry) {
039 _ratingsEntry = ratingsEntry;
040 }
041
042 @Override
043 public Class<?> getModelClass() {
044 return RatingsEntry.class;
045 }
046
047 @Override
048 public String getModelClassName() {
049 return RatingsEntry.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("entryId", getEntryId());
057 attributes.put("companyId", getCompanyId());
058 attributes.put("userId", getUserId());
059 attributes.put("userName", getUserName());
060 attributes.put("createDate", getCreateDate());
061 attributes.put("modifiedDate", getModifiedDate());
062 attributes.put("classNameId", getClassNameId());
063 attributes.put("classPK", getClassPK());
064 attributes.put("score", getScore());
065
066 return attributes;
067 }
068
069 @Override
070 public void setModelAttributes(Map<String, Object> attributes) {
071 Long entryId = (Long)attributes.get("entryId");
072
073 if (entryId != null) {
074 setEntryId(entryId);
075 }
076
077 Long companyId = (Long)attributes.get("companyId");
078
079 if (companyId != null) {
080 setCompanyId(companyId);
081 }
082
083 Long userId = (Long)attributes.get("userId");
084
085 if (userId != null) {
086 setUserId(userId);
087 }
088
089 String userName = (String)attributes.get("userName");
090
091 if (userName != null) {
092 setUserName(userName);
093 }
094
095 Date createDate = (Date)attributes.get("createDate");
096
097 if (createDate != null) {
098 setCreateDate(createDate);
099 }
100
101 Date modifiedDate = (Date)attributes.get("modifiedDate");
102
103 if (modifiedDate != null) {
104 setModifiedDate(modifiedDate);
105 }
106
107 Long classNameId = (Long)attributes.get("classNameId");
108
109 if (classNameId != null) {
110 setClassNameId(classNameId);
111 }
112
113 Long classPK = (Long)attributes.get("classPK");
114
115 if (classPK != null) {
116 setClassPK(classPK);
117 }
118
119 Double score = (Double)attributes.get("score");
120
121 if (score != null) {
122 setScore(score);
123 }
124 }
125
126
131 @Override
132 public long getPrimaryKey() {
133 return _ratingsEntry.getPrimaryKey();
134 }
135
136
141 @Override
142 public void setPrimaryKey(long primaryKey) {
143 _ratingsEntry.setPrimaryKey(primaryKey);
144 }
145
146
151 @Override
152 public long getEntryId() {
153 return _ratingsEntry.getEntryId();
154 }
155
156
161 @Override
162 public void setEntryId(long entryId) {
163 _ratingsEntry.setEntryId(entryId);
164 }
165
166
171 @Override
172 public long getCompanyId() {
173 return _ratingsEntry.getCompanyId();
174 }
175
176
181 @Override
182 public void setCompanyId(long companyId) {
183 _ratingsEntry.setCompanyId(companyId);
184 }
185
186
191 @Override
192 public long getUserId() {
193 return _ratingsEntry.getUserId();
194 }
195
196
201 @Override
202 public void setUserId(long userId) {
203 _ratingsEntry.setUserId(userId);
204 }
205
206
212 @Override
213 public java.lang.String getUserUuid()
214 throws com.liferay.portal.kernel.exception.SystemException {
215 return _ratingsEntry.getUserUuid();
216 }
217
218
223 @Override
224 public void setUserUuid(java.lang.String userUuid) {
225 _ratingsEntry.setUserUuid(userUuid);
226 }
227
228
233 @Override
234 public java.lang.String getUserName() {
235 return _ratingsEntry.getUserName();
236 }
237
238
243 @Override
244 public void setUserName(java.lang.String userName) {
245 _ratingsEntry.setUserName(userName);
246 }
247
248
253 @Override
254 public java.util.Date getCreateDate() {
255 return _ratingsEntry.getCreateDate();
256 }
257
258
263 @Override
264 public void setCreateDate(java.util.Date createDate) {
265 _ratingsEntry.setCreateDate(createDate);
266 }
267
268
273 @Override
274 public java.util.Date getModifiedDate() {
275 return _ratingsEntry.getModifiedDate();
276 }
277
278
283 @Override
284 public void setModifiedDate(java.util.Date modifiedDate) {
285 _ratingsEntry.setModifiedDate(modifiedDate);
286 }
287
288
293 @Override
294 public java.lang.String getClassName() {
295 return _ratingsEntry.getClassName();
296 }
297
298 @Override
299 public void setClassName(java.lang.String className) {
300 _ratingsEntry.setClassName(className);
301 }
302
303
308 @Override
309 public long getClassNameId() {
310 return _ratingsEntry.getClassNameId();
311 }
312
313
318 @Override
319 public void setClassNameId(long classNameId) {
320 _ratingsEntry.setClassNameId(classNameId);
321 }
322
323
328 @Override
329 public long getClassPK() {
330 return _ratingsEntry.getClassPK();
331 }
332
333
338 @Override
339 public void setClassPK(long classPK) {
340 _ratingsEntry.setClassPK(classPK);
341 }
342
343
348 @Override
349 public double getScore() {
350 return _ratingsEntry.getScore();
351 }
352
353
358 @Override
359 public void setScore(double score) {
360 _ratingsEntry.setScore(score);
361 }
362
363 @Override
364 public boolean isNew() {
365 return _ratingsEntry.isNew();
366 }
367
368 @Override
369 public void setNew(boolean n) {
370 _ratingsEntry.setNew(n);
371 }
372
373 @Override
374 public boolean isCachedModel() {
375 return _ratingsEntry.isCachedModel();
376 }
377
378 @Override
379 public void setCachedModel(boolean cachedModel) {
380 _ratingsEntry.setCachedModel(cachedModel);
381 }
382
383 @Override
384 public boolean isEscapedModel() {
385 return _ratingsEntry.isEscapedModel();
386 }
387
388 @Override
389 public java.io.Serializable getPrimaryKeyObj() {
390 return _ratingsEntry.getPrimaryKeyObj();
391 }
392
393 @Override
394 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
395 _ratingsEntry.setPrimaryKeyObj(primaryKeyObj);
396 }
397
398 @Override
399 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
400 return _ratingsEntry.getExpandoBridge();
401 }
402
403 @Override
404 public void setExpandoBridgeAttributes(
405 com.liferay.portal.model.BaseModel<?> baseModel) {
406 _ratingsEntry.setExpandoBridgeAttributes(baseModel);
407 }
408
409 @Override
410 public void setExpandoBridgeAttributes(
411 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
412 _ratingsEntry.setExpandoBridgeAttributes(expandoBridge);
413 }
414
415 @Override
416 public void setExpandoBridgeAttributes(
417 com.liferay.portal.service.ServiceContext serviceContext) {
418 _ratingsEntry.setExpandoBridgeAttributes(serviceContext);
419 }
420
421 @Override
422 public java.lang.Object clone() {
423 return new RatingsEntryWrapper((RatingsEntry)_ratingsEntry.clone());
424 }
425
426 @Override
427 public int compareTo(
428 com.liferay.portlet.ratings.model.RatingsEntry ratingsEntry) {
429 return _ratingsEntry.compareTo(ratingsEntry);
430 }
431
432 @Override
433 public int hashCode() {
434 return _ratingsEntry.hashCode();
435 }
436
437 @Override
438 public com.liferay.portal.model.CacheModel<com.liferay.portlet.ratings.model.RatingsEntry> toCacheModel() {
439 return _ratingsEntry.toCacheModel();
440 }
441
442 @Override
443 public com.liferay.portlet.ratings.model.RatingsEntry toEscapedModel() {
444 return new RatingsEntryWrapper(_ratingsEntry.toEscapedModel());
445 }
446
447 @Override
448 public com.liferay.portlet.ratings.model.RatingsEntry toUnescapedModel() {
449 return new RatingsEntryWrapper(_ratingsEntry.toUnescapedModel());
450 }
451
452 @Override
453 public java.lang.String toString() {
454 return _ratingsEntry.toString();
455 }
456
457 @Override
458 public java.lang.String toXmlString() {
459 return _ratingsEntry.toXmlString();
460 }
461
462 @Override
463 public void persist()
464 throws com.liferay.portal.kernel.exception.SystemException {
465 _ratingsEntry.persist();
466 }
467
468 @Override
469 public boolean equals(Object obj) {
470 if (this == obj) {
471 return true;
472 }
473
474 if (!(obj instanceof RatingsEntryWrapper)) {
475 return false;
476 }
477
478 RatingsEntryWrapper ratingsEntryWrapper = (RatingsEntryWrapper)obj;
479
480 if (Validator.equals(_ratingsEntry, ratingsEntryWrapper._ratingsEntry)) {
481 return true;
482 }
483
484 return false;
485 }
486
487
490 public RatingsEntry getWrappedRatingsEntry() {
491 return _ratingsEntry;
492 }
493
494 @Override
495 public RatingsEntry getWrappedModel() {
496 return _ratingsEntry;
497 }
498
499 @Override
500 public void resetOriginalValues() {
501 _ratingsEntry.resetOriginalValues();
502 }
503
504 private RatingsEntry _ratingsEntry;
505 }