001
014
015 package com.liferay.portlet.ratings.model;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.lar.StagedModelType;
020 import com.liferay.portal.kernel.util.Validator;
021 import com.liferay.portal.model.ModelWrapper;
022
023 import java.util.Date;
024 import java.util.HashMap;
025 import java.util.Map;
026
027
036 @ProviderType
037 public class RatingsEntryWrapper implements RatingsEntry,
038 ModelWrapper<RatingsEntry> {
039 public RatingsEntryWrapper(RatingsEntry ratingsEntry) {
040 _ratingsEntry = ratingsEntry;
041 }
042
043 @Override
044 public Class<?> getModelClass() {
045 return RatingsEntry.class;
046 }
047
048 @Override
049 public String getModelClassName() {
050 return RatingsEntry.class.getName();
051 }
052
053 @Override
054 public Map<String, Object> getModelAttributes() {
055 Map<String, Object> attributes = new HashMap<String, Object>();
056
057 attributes.put("uuid", getUuid());
058 attributes.put("entryId", getEntryId());
059 attributes.put("companyId", getCompanyId());
060 attributes.put("userId", getUserId());
061 attributes.put("userName", getUserName());
062 attributes.put("createDate", getCreateDate());
063 attributes.put("modifiedDate", getModifiedDate());
064 attributes.put("classNameId", getClassNameId());
065 attributes.put("classPK", getClassPK());
066 attributes.put("score", getScore());
067
068 return attributes;
069 }
070
071 @Override
072 public void setModelAttributes(Map<String, Object> attributes) {
073 String uuid = (String)attributes.get("uuid");
074
075 if (uuid != null) {
076 setUuid(uuid);
077 }
078
079 Long entryId = (Long)attributes.get("entryId");
080
081 if (entryId != null) {
082 setEntryId(entryId);
083 }
084
085 Long companyId = (Long)attributes.get("companyId");
086
087 if (companyId != null) {
088 setCompanyId(companyId);
089 }
090
091 Long userId = (Long)attributes.get("userId");
092
093 if (userId != null) {
094 setUserId(userId);
095 }
096
097 String userName = (String)attributes.get("userName");
098
099 if (userName != null) {
100 setUserName(userName);
101 }
102
103 Date createDate = (Date)attributes.get("createDate");
104
105 if (createDate != null) {
106 setCreateDate(createDate);
107 }
108
109 Date modifiedDate = (Date)attributes.get("modifiedDate");
110
111 if (modifiedDate != null) {
112 setModifiedDate(modifiedDate);
113 }
114
115 Long classNameId = (Long)attributes.get("classNameId");
116
117 if (classNameId != null) {
118 setClassNameId(classNameId);
119 }
120
121 Long classPK = (Long)attributes.get("classPK");
122
123 if (classPK != null) {
124 setClassPK(classPK);
125 }
126
127 Double score = (Double)attributes.get("score");
128
129 if (score != null) {
130 setScore(score);
131 }
132 }
133
134 @Override
135 public java.lang.Object clone() {
136 return new RatingsEntryWrapper((RatingsEntry)_ratingsEntry.clone());
137 }
138
139 @Override
140 public int compareTo(
141 com.liferay.portlet.ratings.model.RatingsEntry ratingsEntry) {
142 return _ratingsEntry.compareTo(ratingsEntry);
143 }
144
145
150 @Override
151 public java.lang.String getClassName() {
152 return _ratingsEntry.getClassName();
153 }
154
155
160 @Override
161 public long getClassNameId() {
162 return _ratingsEntry.getClassNameId();
163 }
164
165
170 @Override
171 public long getClassPK() {
172 return _ratingsEntry.getClassPK();
173 }
174
175
180 @Override
181 public long getCompanyId() {
182 return _ratingsEntry.getCompanyId();
183 }
184
185
190 @Override
191 public java.util.Date getCreateDate() {
192 return _ratingsEntry.getCreateDate();
193 }
194
195
200 @Override
201 public long getEntryId() {
202 return _ratingsEntry.getEntryId();
203 }
204
205 @Override
206 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
207 return _ratingsEntry.getExpandoBridge();
208 }
209
210
215 @Override
216 public java.util.Date getModifiedDate() {
217 return _ratingsEntry.getModifiedDate();
218 }
219
220
225 @Override
226 public long getPrimaryKey() {
227 return _ratingsEntry.getPrimaryKey();
228 }
229
230 @Override
231 public java.io.Serializable getPrimaryKeyObj() {
232 return _ratingsEntry.getPrimaryKeyObj();
233 }
234
235
240 @Override
241 public double getScore() {
242 return _ratingsEntry.getScore();
243 }
244
245
250 @Override
251 public long getUserId() {
252 return _ratingsEntry.getUserId();
253 }
254
255
260 @Override
261 public java.lang.String getUserName() {
262 return _ratingsEntry.getUserName();
263 }
264
265
270 @Override
271 public java.lang.String getUserUuid() {
272 return _ratingsEntry.getUserUuid();
273 }
274
275
280 @Override
281 public java.lang.String getUuid() {
282 return _ratingsEntry.getUuid();
283 }
284
285 @Override
286 public int hashCode() {
287 return _ratingsEntry.hashCode();
288 }
289
290 @Override
291 public boolean isCachedModel() {
292 return _ratingsEntry.isCachedModel();
293 }
294
295 @Override
296 public boolean isEscapedModel() {
297 return _ratingsEntry.isEscapedModel();
298 }
299
300 @Override
301 public boolean isNew() {
302 return _ratingsEntry.isNew();
303 }
304
305 @Override
306 public void persist() {
307 _ratingsEntry.persist();
308 }
309
310 @Override
311 public void setCachedModel(boolean cachedModel) {
312 _ratingsEntry.setCachedModel(cachedModel);
313 }
314
315 @Override
316 public void setClassName(java.lang.String className) {
317 _ratingsEntry.setClassName(className);
318 }
319
320
325 @Override
326 public void setClassNameId(long classNameId) {
327 _ratingsEntry.setClassNameId(classNameId);
328 }
329
330
335 @Override
336 public void setClassPK(long classPK) {
337 _ratingsEntry.setClassPK(classPK);
338 }
339
340
345 @Override
346 public void setCompanyId(long companyId) {
347 _ratingsEntry.setCompanyId(companyId);
348 }
349
350
355 @Override
356 public void setCreateDate(java.util.Date createDate) {
357 _ratingsEntry.setCreateDate(createDate);
358 }
359
360
365 @Override
366 public void setEntryId(long entryId) {
367 _ratingsEntry.setEntryId(entryId);
368 }
369
370 @Override
371 public void setExpandoBridgeAttributes(
372 com.liferay.portal.model.BaseModel<?> baseModel) {
373 _ratingsEntry.setExpandoBridgeAttributes(baseModel);
374 }
375
376 @Override
377 public void setExpandoBridgeAttributes(
378 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
379 _ratingsEntry.setExpandoBridgeAttributes(expandoBridge);
380 }
381
382 @Override
383 public void setExpandoBridgeAttributes(
384 com.liferay.portal.service.ServiceContext serviceContext) {
385 _ratingsEntry.setExpandoBridgeAttributes(serviceContext);
386 }
387
388
393 @Override
394 public void setModifiedDate(java.util.Date modifiedDate) {
395 _ratingsEntry.setModifiedDate(modifiedDate);
396 }
397
398 @Override
399 public void setNew(boolean n) {
400 _ratingsEntry.setNew(n);
401 }
402
403
408 @Override
409 public void setPrimaryKey(long primaryKey) {
410 _ratingsEntry.setPrimaryKey(primaryKey);
411 }
412
413 @Override
414 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
415 _ratingsEntry.setPrimaryKeyObj(primaryKeyObj);
416 }
417
418
423 @Override
424 public void setScore(double score) {
425 _ratingsEntry.setScore(score);
426 }
427
428
433 @Override
434 public void setUserId(long userId) {
435 _ratingsEntry.setUserId(userId);
436 }
437
438
443 @Override
444 public void setUserName(java.lang.String userName) {
445 _ratingsEntry.setUserName(userName);
446 }
447
448
453 @Override
454 public void setUserUuid(java.lang.String userUuid) {
455 _ratingsEntry.setUserUuid(userUuid);
456 }
457
458
463 @Override
464 public void setUuid(java.lang.String uuid) {
465 _ratingsEntry.setUuid(uuid);
466 }
467
468 @Override
469 public com.liferay.portal.model.CacheModel<com.liferay.portlet.ratings.model.RatingsEntry> toCacheModel() {
470 return _ratingsEntry.toCacheModel();
471 }
472
473 @Override
474 public com.liferay.portlet.ratings.model.RatingsEntry toEscapedModel() {
475 return new RatingsEntryWrapper(_ratingsEntry.toEscapedModel());
476 }
477
478 @Override
479 public java.lang.String toString() {
480 return _ratingsEntry.toString();
481 }
482
483 @Override
484 public com.liferay.portlet.ratings.model.RatingsEntry toUnescapedModel() {
485 return new RatingsEntryWrapper(_ratingsEntry.toUnescapedModel());
486 }
487
488 @Override
489 public java.lang.String toXmlString() {
490 return _ratingsEntry.toXmlString();
491 }
492
493 @Override
494 public boolean equals(Object obj) {
495 if (this == obj) {
496 return true;
497 }
498
499 if (!(obj instanceof RatingsEntryWrapper)) {
500 return false;
501 }
502
503 RatingsEntryWrapper ratingsEntryWrapper = (RatingsEntryWrapper)obj;
504
505 if (Validator.equals(_ratingsEntry, ratingsEntryWrapper._ratingsEntry)) {
506 return true;
507 }
508
509 return false;
510 }
511
512 @Override
513 public StagedModelType getStagedModelType() {
514 return _ratingsEntry.getStagedModelType();
515 }
516
517
520 @Deprecated
521 public RatingsEntry getWrappedRatingsEntry() {
522 return _ratingsEntry;
523 }
524
525 @Override
526 public RatingsEntry getWrappedModel() {
527 return _ratingsEntry;
528 }
529
530 @Override
531 public boolean isEntityCacheEnabled() {
532 return _ratingsEntry.isEntityCacheEnabled();
533 }
534
535 @Override
536 public boolean isFinderCacheEnabled() {
537 return _ratingsEntry.isFinderCacheEnabled();
538 }
539
540 @Override
541 public void resetOriginalValues() {
542 _ratingsEntry.resetOriginalValues();
543 }
544
545 private final RatingsEntry _ratingsEntry;
546 }