001
014
015 package com.liferay.ratings.kernel.model;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.expando.kernel.model.ExpandoBridge;
020
021 import com.liferay.exportimport.kernel.lar.StagedModelType;
022
023 import com.liferay.portal.kernel.model.ModelWrapper;
024 import com.liferay.portal.kernel.service.ServiceContext;
025
026 import java.io.Serializable;
027
028 import java.util.Date;
029 import java.util.HashMap;
030 import java.util.Map;
031 import java.util.Objects;
032
033
042 @ProviderType
043 public class RatingsEntryWrapper implements RatingsEntry,
044 ModelWrapper<RatingsEntry> {
045 public RatingsEntryWrapper(RatingsEntry ratingsEntry) {
046 _ratingsEntry = ratingsEntry;
047 }
048
049 @Override
050 public Class<?> getModelClass() {
051 return RatingsEntry.class;
052 }
053
054 @Override
055 public String getModelClassName() {
056 return RatingsEntry.class.getName();
057 }
058
059 @Override
060 public Map<String, Object> getModelAttributes() {
061 Map<String, Object> attributes = new HashMap<String, Object>();
062
063 attributes.put("uuid", getUuid());
064 attributes.put("entryId", getEntryId());
065 attributes.put("companyId", getCompanyId());
066 attributes.put("userId", getUserId());
067 attributes.put("userName", getUserName());
068 attributes.put("createDate", getCreateDate());
069 attributes.put("modifiedDate", getModifiedDate());
070 attributes.put("classNameId", getClassNameId());
071 attributes.put("classPK", getClassPK());
072 attributes.put("score", getScore());
073
074 return attributes;
075 }
076
077 @Override
078 public void setModelAttributes(Map<String, Object> attributes) {
079 String uuid = (String)attributes.get("uuid");
080
081 if (uuid != null) {
082 setUuid(uuid);
083 }
084
085 Long entryId = (Long)attributes.get("entryId");
086
087 if (entryId != null) {
088 setEntryId(entryId);
089 }
090
091 Long companyId = (Long)attributes.get("companyId");
092
093 if (companyId != null) {
094 setCompanyId(companyId);
095 }
096
097 Long userId = (Long)attributes.get("userId");
098
099 if (userId != null) {
100 setUserId(userId);
101 }
102
103 String userName = (String)attributes.get("userName");
104
105 if (userName != null) {
106 setUserName(userName);
107 }
108
109 Date createDate = (Date)attributes.get("createDate");
110
111 if (createDate != null) {
112 setCreateDate(createDate);
113 }
114
115 Date modifiedDate = (Date)attributes.get("modifiedDate");
116
117 if (modifiedDate != null) {
118 setModifiedDate(modifiedDate);
119 }
120
121 Long classNameId = (Long)attributes.get("classNameId");
122
123 if (classNameId != null) {
124 setClassNameId(classNameId);
125 }
126
127 Long classPK = (Long)attributes.get("classPK");
128
129 if (classPK != null) {
130 setClassPK(classPK);
131 }
132
133 Double score = (Double)attributes.get("score");
134
135 if (score != null) {
136 setScore(score);
137 }
138 }
139
140 @Override
141 public RatingsEntry toEscapedModel() {
142 return new RatingsEntryWrapper(_ratingsEntry.toEscapedModel());
143 }
144
145 @Override
146 public RatingsEntry toUnescapedModel() {
147 return new RatingsEntryWrapper(_ratingsEntry.toUnescapedModel());
148 }
149
150 @Override
151 public boolean isCachedModel() {
152 return _ratingsEntry.isCachedModel();
153 }
154
155 @Override
156 public boolean isEscapedModel() {
157 return _ratingsEntry.isEscapedModel();
158 }
159
160 @Override
161 public boolean isNew() {
162 return _ratingsEntry.isNew();
163 }
164
165 @Override
166 public ExpandoBridge getExpandoBridge() {
167 return _ratingsEntry.getExpandoBridge();
168 }
169
170 @Override
171 public com.liferay.portal.kernel.model.CacheModel<RatingsEntry> toCacheModel() {
172 return _ratingsEntry.toCacheModel();
173 }
174
175
180 @Override
181 public double getScore() {
182 return _ratingsEntry.getScore();
183 }
184
185 @Override
186 public int compareTo(RatingsEntry ratingsEntry) {
187 return _ratingsEntry.compareTo(ratingsEntry);
188 }
189
190 @Override
191 public int hashCode() {
192 return _ratingsEntry.hashCode();
193 }
194
195 @Override
196 public Serializable getPrimaryKeyObj() {
197 return _ratingsEntry.getPrimaryKeyObj();
198 }
199
200 @Override
201 public java.lang.Object clone() {
202 return new RatingsEntryWrapper((RatingsEntry)_ratingsEntry.clone());
203 }
204
205
210 @Override
211 public java.lang.String getClassName() {
212 return _ratingsEntry.getClassName();
213 }
214
215
220 @Override
221 public java.lang.String getUserName() {
222 return _ratingsEntry.getUserName();
223 }
224
225
230 @Override
231 public java.lang.String getUserUuid() {
232 return _ratingsEntry.getUserUuid();
233 }
234
235
240 @Override
241 public java.lang.String getUuid() {
242 return _ratingsEntry.getUuid();
243 }
244
245 @Override
246 public java.lang.String toString() {
247 return _ratingsEntry.toString();
248 }
249
250 @Override
251 public java.lang.String toXmlString() {
252 return _ratingsEntry.toXmlString();
253 }
254
255
260 @Override
261 public Date getCreateDate() {
262 return _ratingsEntry.getCreateDate();
263 }
264
265
270 @Override
271 public Date getModifiedDate() {
272 return _ratingsEntry.getModifiedDate();
273 }
274
275
280 @Override
281 public long getClassNameId() {
282 return _ratingsEntry.getClassNameId();
283 }
284
285
290 @Override
291 public long getClassPK() {
292 return _ratingsEntry.getClassPK();
293 }
294
295
300 @Override
301 public long getCompanyId() {
302 return _ratingsEntry.getCompanyId();
303 }
304
305
310 @Override
311 public long getEntryId() {
312 return _ratingsEntry.getEntryId();
313 }
314
315
320 @Override
321 public long getPrimaryKey() {
322 return _ratingsEntry.getPrimaryKey();
323 }
324
325
330 @Override
331 public long getUserId() {
332 return _ratingsEntry.getUserId();
333 }
334
335 @Override
336 public void persist() {
337 _ratingsEntry.persist();
338 }
339
340 @Override
341 public void setCachedModel(boolean cachedModel) {
342 _ratingsEntry.setCachedModel(cachedModel);
343 }
344
345 @Override
346 public void setClassName(java.lang.String className) {
347 _ratingsEntry.setClassName(className);
348 }
349
350
355 @Override
356 public void setClassNameId(long classNameId) {
357 _ratingsEntry.setClassNameId(classNameId);
358 }
359
360
365 @Override
366 public void setClassPK(long classPK) {
367 _ratingsEntry.setClassPK(classPK);
368 }
369
370
375 @Override
376 public void setCompanyId(long companyId) {
377 _ratingsEntry.setCompanyId(companyId);
378 }
379
380
385 @Override
386 public void setCreateDate(Date createDate) {
387 _ratingsEntry.setCreateDate(createDate);
388 }
389
390
395 @Override
396 public void setEntryId(long entryId) {
397 _ratingsEntry.setEntryId(entryId);
398 }
399
400 @Override
401 public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge) {
402 _ratingsEntry.setExpandoBridgeAttributes(expandoBridge);
403 }
404
405 @Override
406 public void setExpandoBridgeAttributes(
407 com.liferay.portal.kernel.model.BaseModel<?> baseModel) {
408 _ratingsEntry.setExpandoBridgeAttributes(baseModel);
409 }
410
411 @Override
412 public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
413 _ratingsEntry.setExpandoBridgeAttributes(serviceContext);
414 }
415
416
421 @Override
422 public void setModifiedDate(Date modifiedDate) {
423 _ratingsEntry.setModifiedDate(modifiedDate);
424 }
425
426 @Override
427 public void setNew(boolean n) {
428 _ratingsEntry.setNew(n);
429 }
430
431
436 @Override
437 public void setPrimaryKey(long primaryKey) {
438 _ratingsEntry.setPrimaryKey(primaryKey);
439 }
440
441 @Override
442 public void setPrimaryKeyObj(Serializable primaryKeyObj) {
443 _ratingsEntry.setPrimaryKeyObj(primaryKeyObj);
444 }
445
446
451 @Override
452 public void setScore(double score) {
453 _ratingsEntry.setScore(score);
454 }
455
456
461 @Override
462 public void setUserId(long userId) {
463 _ratingsEntry.setUserId(userId);
464 }
465
466
471 @Override
472 public void setUserName(java.lang.String userName) {
473 _ratingsEntry.setUserName(userName);
474 }
475
476
481 @Override
482 public void setUserUuid(java.lang.String userUuid) {
483 _ratingsEntry.setUserUuid(userUuid);
484 }
485
486
491 @Override
492 public void setUuid(java.lang.String uuid) {
493 _ratingsEntry.setUuid(uuid);
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 (Objects.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 }