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