001
014
015 package com.liferay.portlet.polls.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 PollsVoteWrapper implements PollsVote, ModelWrapper<PollsVote> {
038 public PollsVoteWrapper(PollsVote pollsVote) {
039 _pollsVote = pollsVote;
040 }
041
042 @Override
043 public Class<?> getModelClass() {
044 return PollsVote.class;
045 }
046
047 @Override
048 public String getModelClassName() {
049 return PollsVote.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("uuid", getUuid());
057 attributes.put("voteId", getVoteId());
058 attributes.put("groupId", getGroupId());
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("questionId", getQuestionId());
065 attributes.put("choiceId", getChoiceId());
066 attributes.put("voteDate", getVoteDate());
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 voteId = (Long)attributes.get("voteId");
080
081 if (voteId != null) {
082 setVoteId(voteId);
083 }
084
085 Long groupId = (Long)attributes.get("groupId");
086
087 if (groupId != null) {
088 setGroupId(groupId);
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 questionId = (Long)attributes.get("questionId");
122
123 if (questionId != null) {
124 setQuestionId(questionId);
125 }
126
127 Long choiceId = (Long)attributes.get("choiceId");
128
129 if (choiceId != null) {
130 setChoiceId(choiceId);
131 }
132
133 Date voteDate = (Date)attributes.get("voteDate");
134
135 if (voteDate != null) {
136 setVoteDate(voteDate);
137 }
138 }
139
140
145 @Override
146 public long getPrimaryKey() {
147 return _pollsVote.getPrimaryKey();
148 }
149
150
155 @Override
156 public void setPrimaryKey(long primaryKey) {
157 _pollsVote.setPrimaryKey(primaryKey);
158 }
159
160
165 @Override
166 public java.lang.String getUuid() {
167 return _pollsVote.getUuid();
168 }
169
170
175 @Override
176 public void setUuid(java.lang.String uuid) {
177 _pollsVote.setUuid(uuid);
178 }
179
180
185 @Override
186 public long getVoteId() {
187 return _pollsVote.getVoteId();
188 }
189
190
195 @Override
196 public void setVoteId(long voteId) {
197 _pollsVote.setVoteId(voteId);
198 }
199
200
205 @Override
206 public long getGroupId() {
207 return _pollsVote.getGroupId();
208 }
209
210
215 @Override
216 public void setGroupId(long groupId) {
217 _pollsVote.setGroupId(groupId);
218 }
219
220
225 @Override
226 public long getCompanyId() {
227 return _pollsVote.getCompanyId();
228 }
229
230
235 @Override
236 public void setCompanyId(long companyId) {
237 _pollsVote.setCompanyId(companyId);
238 }
239
240
245 @Override
246 public long getUserId() {
247 return _pollsVote.getUserId();
248 }
249
250
255 @Override
256 public void setUserId(long userId) {
257 _pollsVote.setUserId(userId);
258 }
259
260
266 @Override
267 public java.lang.String getUserUuid()
268 throws com.liferay.portal.kernel.exception.SystemException {
269 return _pollsVote.getUserUuid();
270 }
271
272
277 @Override
278 public void setUserUuid(java.lang.String userUuid) {
279 _pollsVote.setUserUuid(userUuid);
280 }
281
282
287 @Override
288 public java.lang.String getUserName() {
289 return _pollsVote.getUserName();
290 }
291
292
297 @Override
298 public void setUserName(java.lang.String userName) {
299 _pollsVote.setUserName(userName);
300 }
301
302
307 @Override
308 public java.util.Date getCreateDate() {
309 return _pollsVote.getCreateDate();
310 }
311
312
317 @Override
318 public void setCreateDate(java.util.Date createDate) {
319 _pollsVote.setCreateDate(createDate);
320 }
321
322
327 @Override
328 public java.util.Date getModifiedDate() {
329 return _pollsVote.getModifiedDate();
330 }
331
332
337 @Override
338 public void setModifiedDate(java.util.Date modifiedDate) {
339 _pollsVote.setModifiedDate(modifiedDate);
340 }
341
342
347 @Override
348 public long getQuestionId() {
349 return _pollsVote.getQuestionId();
350 }
351
352
357 @Override
358 public void setQuestionId(long questionId) {
359 _pollsVote.setQuestionId(questionId);
360 }
361
362
367 @Override
368 public long getChoiceId() {
369 return _pollsVote.getChoiceId();
370 }
371
372
377 @Override
378 public void setChoiceId(long choiceId) {
379 _pollsVote.setChoiceId(choiceId);
380 }
381
382
387 @Override
388 public java.util.Date getVoteDate() {
389 return _pollsVote.getVoteDate();
390 }
391
392
397 @Override
398 public void setVoteDate(java.util.Date voteDate) {
399 _pollsVote.setVoteDate(voteDate);
400 }
401
402 @Override
403 public boolean isNew() {
404 return _pollsVote.isNew();
405 }
406
407 @Override
408 public void setNew(boolean n) {
409 _pollsVote.setNew(n);
410 }
411
412 @Override
413 public boolean isCachedModel() {
414 return _pollsVote.isCachedModel();
415 }
416
417 @Override
418 public void setCachedModel(boolean cachedModel) {
419 _pollsVote.setCachedModel(cachedModel);
420 }
421
422 @Override
423 public boolean isEscapedModel() {
424 return _pollsVote.isEscapedModel();
425 }
426
427 @Override
428 public java.io.Serializable getPrimaryKeyObj() {
429 return _pollsVote.getPrimaryKeyObj();
430 }
431
432 @Override
433 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
434 _pollsVote.setPrimaryKeyObj(primaryKeyObj);
435 }
436
437 @Override
438 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
439 return _pollsVote.getExpandoBridge();
440 }
441
442 @Override
443 public void setExpandoBridgeAttributes(
444 com.liferay.portal.model.BaseModel<?> baseModel) {
445 _pollsVote.setExpandoBridgeAttributes(baseModel);
446 }
447
448 @Override
449 public void setExpandoBridgeAttributes(
450 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
451 _pollsVote.setExpandoBridgeAttributes(expandoBridge);
452 }
453
454 @Override
455 public void setExpandoBridgeAttributes(
456 com.liferay.portal.service.ServiceContext serviceContext) {
457 _pollsVote.setExpandoBridgeAttributes(serviceContext);
458 }
459
460 @Override
461 public java.lang.Object clone() {
462 return new PollsVoteWrapper((PollsVote)_pollsVote.clone());
463 }
464
465 @Override
466 public int compareTo(com.liferay.portlet.polls.model.PollsVote pollsVote) {
467 return _pollsVote.compareTo(pollsVote);
468 }
469
470 @Override
471 public int hashCode() {
472 return _pollsVote.hashCode();
473 }
474
475 @Override
476 public com.liferay.portal.model.CacheModel<com.liferay.portlet.polls.model.PollsVote> toCacheModel() {
477 return _pollsVote.toCacheModel();
478 }
479
480 @Override
481 public com.liferay.portlet.polls.model.PollsVote toEscapedModel() {
482 return new PollsVoteWrapper(_pollsVote.toEscapedModel());
483 }
484
485 @Override
486 public com.liferay.portlet.polls.model.PollsVote toUnescapedModel() {
487 return new PollsVoteWrapper(_pollsVote.toUnescapedModel());
488 }
489
490 @Override
491 public java.lang.String toString() {
492 return _pollsVote.toString();
493 }
494
495 @Override
496 public java.lang.String toXmlString() {
497 return _pollsVote.toXmlString();
498 }
499
500 @Override
501 public void persist()
502 throws com.liferay.portal.kernel.exception.SystemException {
503 _pollsVote.persist();
504 }
505
506 @Override
507 public com.liferay.portlet.polls.model.PollsChoice getChoice()
508 throws com.liferay.portal.kernel.exception.PortalException,
509 com.liferay.portal.kernel.exception.SystemException {
510 return _pollsVote.getChoice();
511 }
512
513 @Override
514 public boolean equals(Object obj) {
515 if (this == obj) {
516 return true;
517 }
518
519 if (!(obj instanceof PollsVoteWrapper)) {
520 return false;
521 }
522
523 PollsVoteWrapper pollsVoteWrapper = (PollsVoteWrapper)obj;
524
525 if (Validator.equals(_pollsVote, pollsVoteWrapper._pollsVote)) {
526 return true;
527 }
528
529 return false;
530 }
531
532 @Override
533 public StagedModelType getStagedModelType() {
534 return _pollsVote.getStagedModelType();
535 }
536
537
540 public PollsVote getWrappedPollsVote() {
541 return _pollsVote;
542 }
543
544 @Override
545 public PollsVote getWrappedModel() {
546 return _pollsVote;
547 }
548
549 @Override
550 public void resetOriginalValues() {
551 _pollsVote.resetOriginalValues();
552 }
553
554 private PollsVote _pollsVote;
555 }