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 import com.liferay.portal.service.ServiceContext;
022
023 import com.liferay.portlet.expando.model.ExpandoBridge;
024 import com.liferay.portlet.exportimport.lar.StagedModelType;
025
026 import java.io.Serializable;
027
028 import java.util.Date;
029 import java.util.HashMap;
030 import java.util.Map;
031
032
041 @ProviderType
042 public class RatingsEntryWrapper implements RatingsEntry,
043 ModelWrapper<RatingsEntry> {
044 public RatingsEntryWrapper(RatingsEntry ratingsEntry) {
045 _ratingsEntry = ratingsEntry;
046 }
047
048 @Override
049 public Class<?> getModelClass() {
050 return RatingsEntry.class;
051 }
052
053 @Override
054 public String getModelClassName() {
055 return RatingsEntry.class.getName();
056 }
057
058 @Override
059 public Map<String, Object> getModelAttributes() {
060 Map<String, Object> attributes = new HashMap<String, Object>();
061
062 attributes.put("uuid", getUuid());
063 attributes.put("entryId", getEntryId());
064 attributes.put("companyId", getCompanyId());
065 attributes.put("userId", getUserId());
066 attributes.put("userName", getUserName());
067 attributes.put("createDate", getCreateDate());
068 attributes.put("modifiedDate", getModifiedDate());
069 attributes.put("classNameId", getClassNameId());
070 attributes.put("classPK", getClassPK());
071 attributes.put("score", getScore());
072
073 return attributes;
074 }
075
076 @Override
077 public void setModelAttributes(Map<String, Object> attributes) {
078 String uuid = (String)attributes.get("uuid");
079
080 if (uuid != null) {
081 setUuid(uuid);
082 }
083
084 Long entryId = (Long)attributes.get("entryId");
085
086 if (entryId != null) {
087 setEntryId(entryId);
088 }
089
090 Long companyId = (Long)attributes.get("companyId");
091
092 if (companyId != null) {
093 setCompanyId(companyId);
094 }
095
096 Long userId = (Long)attributes.get("userId");
097
098 if (userId != null) {
099 setUserId(userId);
100 }
101
102 String userName = (String)attributes.get("userName");
103
104 if (userName != null) {
105 setUserName(userName);
106 }
107
108 Date createDate = (Date)attributes.get("createDate");
109
110 if (createDate != null) {
111 setCreateDate(createDate);
112 }
113
114 Date modifiedDate = (Date)attributes.get("modifiedDate");
115
116 if (modifiedDate != null) {
117 setModifiedDate(modifiedDate);
118 }
119
120 Long classNameId = (Long)attributes.get("classNameId");
121
122 if (classNameId != null) {
123 setClassNameId(classNameId);
124 }
125
126 Long classPK = (Long)attributes.get("classPK");
127
128 if (classPK != null) {
129 setClassPK(classPK);
130 }
131
132 Double score = (Double)attributes.get("score");
133
134 if (score != null) {
135 setScore(score);
136 }
137 }
138
139 @Override
140 public java.lang.Object clone() {
141 return new RatingsEntryWrapper((RatingsEntry)_ratingsEntry.clone());
142 }
143
144 @Override
145 public int compareTo(
146 com.liferay.portlet.ratings.model.RatingsEntry ratingsEntry) {
147 return _ratingsEntry.compareTo(ratingsEntry);
148 }
149
150
155 @Override
156 public java.lang.String getClassName() {
157 return _ratingsEntry.getClassName();
158 }
159
160
165 @Override
166 public long getClassNameId() {
167 return _ratingsEntry.getClassNameId();
168 }
169
170
175 @Override
176 public long getClassPK() {
177 return _ratingsEntry.getClassPK();
178 }
179
180
185 @Override
186 public long getCompanyId() {
187 return _ratingsEntry.getCompanyId();
188 }
189
190
195 @Override
196 public Date getCreateDate() {
197 return _ratingsEntry.getCreateDate();
198 }
199
200
205 @Override
206 public long getEntryId() {
207 return _ratingsEntry.getEntryId();
208 }
209
210 @Override
211 public ExpandoBridge getExpandoBridge() {
212 return _ratingsEntry.getExpandoBridge();
213 }
214
215
220 @Override
221 public Date getModifiedDate() {
222 return _ratingsEntry.getModifiedDate();
223 }
224
225
230 @Override
231 public long getPrimaryKey() {
232 return _ratingsEntry.getPrimaryKey();
233 }
234
235 @Override
236 public Serializable getPrimaryKeyObj() {
237 return _ratingsEntry.getPrimaryKeyObj();
238 }
239
240
245 @Override
246 public double getScore() {
247 return _ratingsEntry.getScore();
248 }
249
250
255 @Override
256 public long getUserId() {
257 return _ratingsEntry.getUserId();
258 }
259
260
265 @Override
266 public java.lang.String getUserName() {
267 return _ratingsEntry.getUserName();
268 }
269
270
275 @Override
276 public java.lang.String getUserUuid() {
277 return _ratingsEntry.getUserUuid();
278 }
279
280
285 @Override
286 public java.lang.String getUuid() {
287 return _ratingsEntry.getUuid();
288 }
289
290 @Override
291 public int hashCode() {
292 return _ratingsEntry.hashCode();
293 }
294
295 @Override
296 public boolean isCachedModel() {
297 return _ratingsEntry.isCachedModel();
298 }
299
300 @Override
301 public boolean isEscapedModel() {
302 return _ratingsEntry.isEscapedModel();
303 }
304
305 @Override
306 public boolean isNew() {
307 return _ratingsEntry.isNew();
308 }
309
310 @Override
311 public void persist() {
312 _ratingsEntry.persist();
313 }
314
315 @Override
316 public void setCachedModel(boolean cachedModel) {
317 _ratingsEntry.setCachedModel(cachedModel);
318 }
319
320 @Override
321 public void setClassName(java.lang.String className) {
322 _ratingsEntry.setClassName(className);
323 }
324
325
330 @Override
331 public void setClassNameId(long classNameId) {
332 _ratingsEntry.setClassNameId(classNameId);
333 }
334
335
340 @Override
341 public void setClassPK(long classPK) {
342 _ratingsEntry.setClassPK(classPK);
343 }
344
345
350 @Override
351 public void setCompanyId(long companyId) {
352 _ratingsEntry.setCompanyId(companyId);
353 }
354
355
360 @Override
361 public void setCreateDate(Date createDate) {
362 _ratingsEntry.setCreateDate(createDate);
363 }
364
365
370 @Override
371 public void setEntryId(long entryId) {
372 _ratingsEntry.setEntryId(entryId);
373 }
374
375 @Override
376 public void setExpandoBridgeAttributes(
377 com.liferay.portal.model.BaseModel<?> baseModel) {
378 _ratingsEntry.setExpandoBridgeAttributes(baseModel);
379 }
380
381 @Override
382 public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge) {
383 _ratingsEntry.setExpandoBridgeAttributes(expandoBridge);
384 }
385
386 @Override
387 public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
388 _ratingsEntry.setExpandoBridgeAttributes(serviceContext);
389 }
390
391
396 @Override
397 public void setModifiedDate(Date modifiedDate) {
398 _ratingsEntry.setModifiedDate(modifiedDate);
399 }
400
401 @Override
402 public void setNew(boolean n) {
403 _ratingsEntry.setNew(n);
404 }
405
406
411 @Override
412 public void setPrimaryKey(long primaryKey) {
413 _ratingsEntry.setPrimaryKey(primaryKey);
414 }
415
416 @Override
417 public void setPrimaryKeyObj(Serializable primaryKeyObj) {
418 _ratingsEntry.setPrimaryKeyObj(primaryKeyObj);
419 }
420
421
426 @Override
427 public void setScore(double score) {
428 _ratingsEntry.setScore(score);
429 }
430
431
436 @Override
437 public void setUserId(long userId) {
438 _ratingsEntry.setUserId(userId);
439 }
440
441
446 @Override
447 public void setUserName(java.lang.String userName) {
448 _ratingsEntry.setUserName(userName);
449 }
450
451
456 @Override
457 public void setUserUuid(java.lang.String userUuid) {
458 _ratingsEntry.setUserUuid(userUuid);
459 }
460
461
466 @Override
467 public void setUuid(java.lang.String uuid) {
468 _ratingsEntry.setUuid(uuid);
469 }
470
471 @Override
472 public com.liferay.portal.model.CacheModel<com.liferay.portlet.ratings.model.RatingsEntry> toCacheModel() {
473 return _ratingsEntry.toCacheModel();
474 }
475
476 @Override
477 public com.liferay.portlet.ratings.model.RatingsEntry toEscapedModel() {
478 return new RatingsEntryWrapper(_ratingsEntry.toEscapedModel());
479 }
480
481 @Override
482 public java.lang.String toString() {
483 return _ratingsEntry.toString();
484 }
485
486 @Override
487 public com.liferay.portlet.ratings.model.RatingsEntry toUnescapedModel() {
488 return new RatingsEntryWrapper(_ratingsEntry.toUnescapedModel());
489 }
490
491 @Override
492 public java.lang.String toXmlString() {
493 return _ratingsEntry.toXmlString();
494 }
495
496 @Override
497 public boolean equals(Object obj) {
498 if (this == obj) {
499 return true;
500 }
501
502 if (!(obj instanceof RatingsEntryWrapper)) {
503 return false;
504 }
505
506 RatingsEntryWrapper ratingsEntryWrapper = (RatingsEntryWrapper)obj;
507
508 if (Validator.equals(_ratingsEntry, ratingsEntryWrapper._ratingsEntry)) {
509 return true;
510 }
511
512 return false;
513 }
514
515 @Override
516 public StagedModelType getStagedModelType() {
517 return _ratingsEntry.getStagedModelType();
518 }
519
520 @Override
521 public RatingsEntry getWrappedModel() {
522 return _ratingsEntry;
523 }
524
525 @Override
526 public boolean isEntityCacheEnabled() {
527 return _ratingsEntry.isEntityCacheEnabled();
528 }
529
530 @Override
531 public boolean isFinderCacheEnabled() {
532 return _ratingsEntry.isFinderCacheEnabled();
533 }
534
535 @Override
536 public void resetOriginalValues() {
537 _ratingsEntry.resetOriginalValues();
538 }
539
540 private final RatingsEntry _ratingsEntry;
541 }