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 PollsChoiceWrapper implements PollsChoice,
038 ModelWrapper<PollsChoice> {
039 public PollsChoiceWrapper(PollsChoice pollsChoice) {
040 _pollsChoice = pollsChoice;
041 }
042
043 @Override
044 public Class<?> getModelClass() {
045 return PollsChoice.class;
046 }
047
048 @Override
049 public String getModelClassName() {
050 return PollsChoice.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("choiceId", getChoiceId());
059 attributes.put("groupId", getGroupId());
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("questionId", getQuestionId());
066 attributes.put("name", getName());
067 attributes.put("description", getDescription());
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 choiceId = (Long)attributes.get("choiceId");
081
082 if (choiceId != null) {
083 setChoiceId(choiceId);
084 }
085
086 Long groupId = (Long)attributes.get("groupId");
087
088 if (groupId != null) {
089 setGroupId(groupId);
090 }
091
092 Long companyId = (Long)attributes.get("companyId");
093
094 if (companyId != null) {
095 setCompanyId(companyId);
096 }
097
098 Long userId = (Long)attributes.get("userId");
099
100 if (userId != null) {
101 setUserId(userId);
102 }
103
104 String userName = (String)attributes.get("userName");
105
106 if (userName != null) {
107 setUserName(userName);
108 }
109
110 Date createDate = (Date)attributes.get("createDate");
111
112 if (createDate != null) {
113 setCreateDate(createDate);
114 }
115
116 Date modifiedDate = (Date)attributes.get("modifiedDate");
117
118 if (modifiedDate != null) {
119 setModifiedDate(modifiedDate);
120 }
121
122 Long questionId = (Long)attributes.get("questionId");
123
124 if (questionId != null) {
125 setQuestionId(questionId);
126 }
127
128 String name = (String)attributes.get("name");
129
130 if (name != null) {
131 setName(name);
132 }
133
134 String description = (String)attributes.get("description");
135
136 if (description != null) {
137 setDescription(description);
138 }
139 }
140
141
146 @Override
147 public long getPrimaryKey() {
148 return _pollsChoice.getPrimaryKey();
149 }
150
151
156 @Override
157 public void setPrimaryKey(long primaryKey) {
158 _pollsChoice.setPrimaryKey(primaryKey);
159 }
160
161
166 @Override
167 public java.lang.String getUuid() {
168 return _pollsChoice.getUuid();
169 }
170
171
176 @Override
177 public void setUuid(java.lang.String uuid) {
178 _pollsChoice.setUuid(uuid);
179 }
180
181
186 @Override
187 public long getChoiceId() {
188 return _pollsChoice.getChoiceId();
189 }
190
191
196 @Override
197 public void setChoiceId(long choiceId) {
198 _pollsChoice.setChoiceId(choiceId);
199 }
200
201
206 @Override
207 public long getGroupId() {
208 return _pollsChoice.getGroupId();
209 }
210
211
216 @Override
217 public void setGroupId(long groupId) {
218 _pollsChoice.setGroupId(groupId);
219 }
220
221
226 @Override
227 public long getCompanyId() {
228 return _pollsChoice.getCompanyId();
229 }
230
231
236 @Override
237 public void setCompanyId(long companyId) {
238 _pollsChoice.setCompanyId(companyId);
239 }
240
241
246 @Override
247 public long getUserId() {
248 return _pollsChoice.getUserId();
249 }
250
251
256 @Override
257 public void setUserId(long userId) {
258 _pollsChoice.setUserId(userId);
259 }
260
261
267 @Override
268 public java.lang.String getUserUuid()
269 throws com.liferay.portal.kernel.exception.SystemException {
270 return _pollsChoice.getUserUuid();
271 }
272
273
278 @Override
279 public void setUserUuid(java.lang.String userUuid) {
280 _pollsChoice.setUserUuid(userUuid);
281 }
282
283
288 @Override
289 public java.lang.String getUserName() {
290 return _pollsChoice.getUserName();
291 }
292
293
298 @Override
299 public void setUserName(java.lang.String userName) {
300 _pollsChoice.setUserName(userName);
301 }
302
303
308 @Override
309 public java.util.Date getCreateDate() {
310 return _pollsChoice.getCreateDate();
311 }
312
313
318 @Override
319 public void setCreateDate(java.util.Date createDate) {
320 _pollsChoice.setCreateDate(createDate);
321 }
322
323
328 @Override
329 public java.util.Date getModifiedDate() {
330 return _pollsChoice.getModifiedDate();
331 }
332
333
338 @Override
339 public void setModifiedDate(java.util.Date modifiedDate) {
340 _pollsChoice.setModifiedDate(modifiedDate);
341 }
342
343
348 @Override
349 public long getQuestionId() {
350 return _pollsChoice.getQuestionId();
351 }
352
353
358 @Override
359 public void setQuestionId(long questionId) {
360 _pollsChoice.setQuestionId(questionId);
361 }
362
363
368 @Override
369 public java.lang.String getName() {
370 return _pollsChoice.getName();
371 }
372
373
378 @Override
379 public void setName(java.lang.String name) {
380 _pollsChoice.setName(name);
381 }
382
383
388 @Override
389 public java.lang.String getDescription() {
390 return _pollsChoice.getDescription();
391 }
392
393
399 @Override
400 public java.lang.String getDescription(java.util.Locale locale) {
401 return _pollsChoice.getDescription(locale);
402 }
403
404
411 @Override
412 public java.lang.String getDescription(java.util.Locale locale,
413 boolean useDefault) {
414 return _pollsChoice.getDescription(locale, useDefault);
415 }
416
417
423 @Override
424 public java.lang.String getDescription(java.lang.String languageId) {
425 return _pollsChoice.getDescription(languageId);
426 }
427
428
435 @Override
436 public java.lang.String getDescription(java.lang.String languageId,
437 boolean useDefault) {
438 return _pollsChoice.getDescription(languageId, useDefault);
439 }
440
441 @Override
442 public java.lang.String getDescriptionCurrentLanguageId() {
443 return _pollsChoice.getDescriptionCurrentLanguageId();
444 }
445
446 @Override
447 public java.lang.String getDescriptionCurrentValue() {
448 return _pollsChoice.getDescriptionCurrentValue();
449 }
450
451
456 @Override
457 public java.util.Map<java.util.Locale, java.lang.String> getDescriptionMap() {
458 return _pollsChoice.getDescriptionMap();
459 }
460
461
466 @Override
467 public void setDescription(java.lang.String description) {
468 _pollsChoice.setDescription(description);
469 }
470
471
477 @Override
478 public void setDescription(java.lang.String description,
479 java.util.Locale locale) {
480 _pollsChoice.setDescription(description, locale);
481 }
482
483
490 @Override
491 public void setDescription(java.lang.String description,
492 java.util.Locale locale, java.util.Locale defaultLocale) {
493 _pollsChoice.setDescription(description, locale, defaultLocale);
494 }
495
496 @Override
497 public void setDescriptionCurrentLanguageId(java.lang.String languageId) {
498 _pollsChoice.setDescriptionCurrentLanguageId(languageId);
499 }
500
501
506 @Override
507 public void setDescriptionMap(
508 java.util.Map<java.util.Locale, java.lang.String> descriptionMap) {
509 _pollsChoice.setDescriptionMap(descriptionMap);
510 }
511
512
518 @Override
519 public void setDescriptionMap(
520 java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
521 java.util.Locale defaultLocale) {
522 _pollsChoice.setDescriptionMap(descriptionMap, defaultLocale);
523 }
524
525 @Override
526 public boolean isNew() {
527 return _pollsChoice.isNew();
528 }
529
530 @Override
531 public void setNew(boolean n) {
532 _pollsChoice.setNew(n);
533 }
534
535 @Override
536 public boolean isCachedModel() {
537 return _pollsChoice.isCachedModel();
538 }
539
540 @Override
541 public void setCachedModel(boolean cachedModel) {
542 _pollsChoice.setCachedModel(cachedModel);
543 }
544
545 @Override
546 public boolean isEscapedModel() {
547 return _pollsChoice.isEscapedModel();
548 }
549
550 @Override
551 public java.io.Serializable getPrimaryKeyObj() {
552 return _pollsChoice.getPrimaryKeyObj();
553 }
554
555 @Override
556 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
557 _pollsChoice.setPrimaryKeyObj(primaryKeyObj);
558 }
559
560 @Override
561 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
562 return _pollsChoice.getExpandoBridge();
563 }
564
565 @Override
566 public void setExpandoBridgeAttributes(
567 com.liferay.portal.model.BaseModel<?> baseModel) {
568 _pollsChoice.setExpandoBridgeAttributes(baseModel);
569 }
570
571 @Override
572 public void setExpandoBridgeAttributes(
573 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
574 _pollsChoice.setExpandoBridgeAttributes(expandoBridge);
575 }
576
577 @Override
578 public void setExpandoBridgeAttributes(
579 com.liferay.portal.service.ServiceContext serviceContext) {
580 _pollsChoice.setExpandoBridgeAttributes(serviceContext);
581 }
582
583 @Override
584 public java.lang.String[] getAvailableLanguageIds() {
585 return _pollsChoice.getAvailableLanguageIds();
586 }
587
588 @Override
589 public java.lang.String getDefaultLanguageId() {
590 return _pollsChoice.getDefaultLanguageId();
591 }
592
593 @Override
594 public void prepareLocalizedFieldsForImport()
595 throws com.liferay.portal.LocaleException {
596 _pollsChoice.prepareLocalizedFieldsForImport();
597 }
598
599 @Override
600 public void prepareLocalizedFieldsForImport(
601 java.util.Locale defaultImportLocale)
602 throws com.liferay.portal.LocaleException {
603 _pollsChoice.prepareLocalizedFieldsForImport(defaultImportLocale);
604 }
605
606 @Override
607 public java.lang.Object clone() {
608 return new PollsChoiceWrapper((PollsChoice)_pollsChoice.clone());
609 }
610
611 @Override
612 public int compareTo(
613 com.liferay.portlet.polls.model.PollsChoice pollsChoice) {
614 return _pollsChoice.compareTo(pollsChoice);
615 }
616
617 @Override
618 public int hashCode() {
619 return _pollsChoice.hashCode();
620 }
621
622 @Override
623 public com.liferay.portal.model.CacheModel<com.liferay.portlet.polls.model.PollsChoice> toCacheModel() {
624 return _pollsChoice.toCacheModel();
625 }
626
627 @Override
628 public com.liferay.portlet.polls.model.PollsChoice toEscapedModel() {
629 return new PollsChoiceWrapper(_pollsChoice.toEscapedModel());
630 }
631
632 @Override
633 public com.liferay.portlet.polls.model.PollsChoice toUnescapedModel() {
634 return new PollsChoiceWrapper(_pollsChoice.toUnescapedModel());
635 }
636
637 @Override
638 public java.lang.String toString() {
639 return _pollsChoice.toString();
640 }
641
642 @Override
643 public java.lang.String toXmlString() {
644 return _pollsChoice.toXmlString();
645 }
646
647 @Override
648 public void persist()
649 throws com.liferay.portal.kernel.exception.SystemException {
650 _pollsChoice.persist();
651 }
652
653 @Override
654 public int getVotesCount()
655 throws com.liferay.portal.kernel.exception.SystemException {
656 return _pollsChoice.getVotesCount();
657 }
658
659 @Override
660 public boolean equals(Object obj) {
661 if (this == obj) {
662 return true;
663 }
664
665 if (!(obj instanceof PollsChoiceWrapper)) {
666 return false;
667 }
668
669 PollsChoiceWrapper pollsChoiceWrapper = (PollsChoiceWrapper)obj;
670
671 if (Validator.equals(_pollsChoice, pollsChoiceWrapper._pollsChoice)) {
672 return true;
673 }
674
675 return false;
676 }
677
678 @Override
679 public StagedModelType getStagedModelType() {
680 return _pollsChoice.getStagedModelType();
681 }
682
683
686 public PollsChoice getWrappedPollsChoice() {
687 return _pollsChoice;
688 }
689
690 @Override
691 public PollsChoice getWrappedModel() {
692 return _pollsChoice;
693 }
694
695 @Override
696 public void resetOriginalValues() {
697 _pollsChoice.resetOriginalValues();
698 }
699
700 private PollsChoice _pollsChoice;
701 }