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 PollsQuestionWrapper implements PollsQuestion,
038 ModelWrapper<PollsQuestion> {
039 public PollsQuestionWrapper(PollsQuestion pollsQuestion) {
040 _pollsQuestion = pollsQuestion;
041 }
042
043 @Override
044 public Class<?> getModelClass() {
045 return PollsQuestion.class;
046 }
047
048 @Override
049 public String getModelClassName() {
050 return PollsQuestion.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("questionId", getQuestionId());
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("title", getTitle());
066 attributes.put("description", getDescription());
067 attributes.put("expirationDate", getExpirationDate());
068 attributes.put("lastVoteDate", getLastVoteDate());
069
070 return attributes;
071 }
072
073 @Override
074 public void setModelAttributes(Map<String, Object> attributes) {
075 String uuid = (String)attributes.get("uuid");
076
077 if (uuid != null) {
078 setUuid(uuid);
079 }
080
081 Long questionId = (Long)attributes.get("questionId");
082
083 if (questionId != null) {
084 setQuestionId(questionId);
085 }
086
087 Long groupId = (Long)attributes.get("groupId");
088
089 if (groupId != null) {
090 setGroupId(groupId);
091 }
092
093 Long companyId = (Long)attributes.get("companyId");
094
095 if (companyId != null) {
096 setCompanyId(companyId);
097 }
098
099 Long userId = (Long)attributes.get("userId");
100
101 if (userId != null) {
102 setUserId(userId);
103 }
104
105 String userName = (String)attributes.get("userName");
106
107 if (userName != null) {
108 setUserName(userName);
109 }
110
111 Date createDate = (Date)attributes.get("createDate");
112
113 if (createDate != null) {
114 setCreateDate(createDate);
115 }
116
117 Date modifiedDate = (Date)attributes.get("modifiedDate");
118
119 if (modifiedDate != null) {
120 setModifiedDate(modifiedDate);
121 }
122
123 String title = (String)attributes.get("title");
124
125 if (title != null) {
126 setTitle(title);
127 }
128
129 String description = (String)attributes.get("description");
130
131 if (description != null) {
132 setDescription(description);
133 }
134
135 Date expirationDate = (Date)attributes.get("expirationDate");
136
137 if (expirationDate != null) {
138 setExpirationDate(expirationDate);
139 }
140
141 Date lastVoteDate = (Date)attributes.get("lastVoteDate");
142
143 if (lastVoteDate != null) {
144 setLastVoteDate(lastVoteDate);
145 }
146 }
147
148
153 @Override
154 public long getPrimaryKey() {
155 return _pollsQuestion.getPrimaryKey();
156 }
157
158
163 @Override
164 public void setPrimaryKey(long primaryKey) {
165 _pollsQuestion.setPrimaryKey(primaryKey);
166 }
167
168
173 @Override
174 public java.lang.String getUuid() {
175 return _pollsQuestion.getUuid();
176 }
177
178
183 @Override
184 public void setUuid(java.lang.String uuid) {
185 _pollsQuestion.setUuid(uuid);
186 }
187
188
193 @Override
194 public long getQuestionId() {
195 return _pollsQuestion.getQuestionId();
196 }
197
198
203 @Override
204 public void setQuestionId(long questionId) {
205 _pollsQuestion.setQuestionId(questionId);
206 }
207
208
213 @Override
214 public long getGroupId() {
215 return _pollsQuestion.getGroupId();
216 }
217
218
223 @Override
224 public void setGroupId(long groupId) {
225 _pollsQuestion.setGroupId(groupId);
226 }
227
228
233 @Override
234 public long getCompanyId() {
235 return _pollsQuestion.getCompanyId();
236 }
237
238
243 @Override
244 public void setCompanyId(long companyId) {
245 _pollsQuestion.setCompanyId(companyId);
246 }
247
248
253 @Override
254 public long getUserId() {
255 return _pollsQuestion.getUserId();
256 }
257
258
263 @Override
264 public void setUserId(long userId) {
265 _pollsQuestion.setUserId(userId);
266 }
267
268
274 @Override
275 public java.lang.String getUserUuid()
276 throws com.liferay.portal.kernel.exception.SystemException {
277 return _pollsQuestion.getUserUuid();
278 }
279
280
285 @Override
286 public void setUserUuid(java.lang.String userUuid) {
287 _pollsQuestion.setUserUuid(userUuid);
288 }
289
290
295 @Override
296 public java.lang.String getUserName() {
297 return _pollsQuestion.getUserName();
298 }
299
300
305 @Override
306 public void setUserName(java.lang.String userName) {
307 _pollsQuestion.setUserName(userName);
308 }
309
310
315 @Override
316 public java.util.Date getCreateDate() {
317 return _pollsQuestion.getCreateDate();
318 }
319
320
325 @Override
326 public void setCreateDate(java.util.Date createDate) {
327 _pollsQuestion.setCreateDate(createDate);
328 }
329
330
335 @Override
336 public java.util.Date getModifiedDate() {
337 return _pollsQuestion.getModifiedDate();
338 }
339
340
345 @Override
346 public void setModifiedDate(java.util.Date modifiedDate) {
347 _pollsQuestion.setModifiedDate(modifiedDate);
348 }
349
350
355 @Override
356 public java.lang.String getTitle() {
357 return _pollsQuestion.getTitle();
358 }
359
360
366 @Override
367 public java.lang.String getTitle(java.util.Locale locale) {
368 return _pollsQuestion.getTitle(locale);
369 }
370
371
378 @Override
379 public java.lang.String getTitle(java.util.Locale locale, boolean useDefault) {
380 return _pollsQuestion.getTitle(locale, useDefault);
381 }
382
383
389 @Override
390 public java.lang.String getTitle(java.lang.String languageId) {
391 return _pollsQuestion.getTitle(languageId);
392 }
393
394
401 @Override
402 public java.lang.String getTitle(java.lang.String languageId,
403 boolean useDefault) {
404 return _pollsQuestion.getTitle(languageId, useDefault);
405 }
406
407 @Override
408 public java.lang.String getTitleCurrentLanguageId() {
409 return _pollsQuestion.getTitleCurrentLanguageId();
410 }
411
412 @Override
413 public java.lang.String getTitleCurrentValue() {
414 return _pollsQuestion.getTitleCurrentValue();
415 }
416
417
422 @Override
423 public java.util.Map<java.util.Locale, java.lang.String> getTitleMap() {
424 return _pollsQuestion.getTitleMap();
425 }
426
427
432 @Override
433 public void setTitle(java.lang.String title) {
434 _pollsQuestion.setTitle(title);
435 }
436
437
443 @Override
444 public void setTitle(java.lang.String title, java.util.Locale locale) {
445 _pollsQuestion.setTitle(title, locale);
446 }
447
448
455 @Override
456 public void setTitle(java.lang.String title, java.util.Locale locale,
457 java.util.Locale defaultLocale) {
458 _pollsQuestion.setTitle(title, locale, defaultLocale);
459 }
460
461 @Override
462 public void setTitleCurrentLanguageId(java.lang.String languageId) {
463 _pollsQuestion.setTitleCurrentLanguageId(languageId);
464 }
465
466
471 @Override
472 public void setTitleMap(
473 java.util.Map<java.util.Locale, java.lang.String> titleMap) {
474 _pollsQuestion.setTitleMap(titleMap);
475 }
476
477
483 @Override
484 public void setTitleMap(
485 java.util.Map<java.util.Locale, java.lang.String> titleMap,
486 java.util.Locale defaultLocale) {
487 _pollsQuestion.setTitleMap(titleMap, defaultLocale);
488 }
489
490
495 @Override
496 public java.lang.String getDescription() {
497 return _pollsQuestion.getDescription();
498 }
499
500
506 @Override
507 public java.lang.String getDescription(java.util.Locale locale) {
508 return _pollsQuestion.getDescription(locale);
509 }
510
511
518 @Override
519 public java.lang.String getDescription(java.util.Locale locale,
520 boolean useDefault) {
521 return _pollsQuestion.getDescription(locale, useDefault);
522 }
523
524
530 @Override
531 public java.lang.String getDescription(java.lang.String languageId) {
532 return _pollsQuestion.getDescription(languageId);
533 }
534
535
542 @Override
543 public java.lang.String getDescription(java.lang.String languageId,
544 boolean useDefault) {
545 return _pollsQuestion.getDescription(languageId, useDefault);
546 }
547
548 @Override
549 public java.lang.String getDescriptionCurrentLanguageId() {
550 return _pollsQuestion.getDescriptionCurrentLanguageId();
551 }
552
553 @Override
554 public java.lang.String getDescriptionCurrentValue() {
555 return _pollsQuestion.getDescriptionCurrentValue();
556 }
557
558
563 @Override
564 public java.util.Map<java.util.Locale, java.lang.String> getDescriptionMap() {
565 return _pollsQuestion.getDescriptionMap();
566 }
567
568
573 @Override
574 public void setDescription(java.lang.String description) {
575 _pollsQuestion.setDescription(description);
576 }
577
578
584 @Override
585 public void setDescription(java.lang.String description,
586 java.util.Locale locale) {
587 _pollsQuestion.setDescription(description, locale);
588 }
589
590
597 @Override
598 public void setDescription(java.lang.String description,
599 java.util.Locale locale, java.util.Locale defaultLocale) {
600 _pollsQuestion.setDescription(description, locale, defaultLocale);
601 }
602
603 @Override
604 public void setDescriptionCurrentLanguageId(java.lang.String languageId) {
605 _pollsQuestion.setDescriptionCurrentLanguageId(languageId);
606 }
607
608
613 @Override
614 public void setDescriptionMap(
615 java.util.Map<java.util.Locale, java.lang.String> descriptionMap) {
616 _pollsQuestion.setDescriptionMap(descriptionMap);
617 }
618
619
625 @Override
626 public void setDescriptionMap(
627 java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
628 java.util.Locale defaultLocale) {
629 _pollsQuestion.setDescriptionMap(descriptionMap, defaultLocale);
630 }
631
632
637 @Override
638 public java.util.Date getExpirationDate() {
639 return _pollsQuestion.getExpirationDate();
640 }
641
642
647 @Override
648 public void setExpirationDate(java.util.Date expirationDate) {
649 _pollsQuestion.setExpirationDate(expirationDate);
650 }
651
652
657 @Override
658 public java.util.Date getLastVoteDate() {
659 return _pollsQuestion.getLastVoteDate();
660 }
661
662
667 @Override
668 public void setLastVoteDate(java.util.Date lastVoteDate) {
669 _pollsQuestion.setLastVoteDate(lastVoteDate);
670 }
671
672 @Override
673 public boolean isNew() {
674 return _pollsQuestion.isNew();
675 }
676
677 @Override
678 public void setNew(boolean n) {
679 _pollsQuestion.setNew(n);
680 }
681
682 @Override
683 public boolean isCachedModel() {
684 return _pollsQuestion.isCachedModel();
685 }
686
687 @Override
688 public void setCachedModel(boolean cachedModel) {
689 _pollsQuestion.setCachedModel(cachedModel);
690 }
691
692 @Override
693 public boolean isEscapedModel() {
694 return _pollsQuestion.isEscapedModel();
695 }
696
697 @Override
698 public java.io.Serializable getPrimaryKeyObj() {
699 return _pollsQuestion.getPrimaryKeyObj();
700 }
701
702 @Override
703 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
704 _pollsQuestion.setPrimaryKeyObj(primaryKeyObj);
705 }
706
707 @Override
708 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
709 return _pollsQuestion.getExpandoBridge();
710 }
711
712 @Override
713 public void setExpandoBridgeAttributes(
714 com.liferay.portal.model.BaseModel<?> baseModel) {
715 _pollsQuestion.setExpandoBridgeAttributes(baseModel);
716 }
717
718 @Override
719 public void setExpandoBridgeAttributes(
720 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
721 _pollsQuestion.setExpandoBridgeAttributes(expandoBridge);
722 }
723
724 @Override
725 public void setExpandoBridgeAttributes(
726 com.liferay.portal.service.ServiceContext serviceContext) {
727 _pollsQuestion.setExpandoBridgeAttributes(serviceContext);
728 }
729
730 @Override
731 public java.lang.String[] getAvailableLanguageIds() {
732 return _pollsQuestion.getAvailableLanguageIds();
733 }
734
735 @Override
736 public java.lang.String getDefaultLanguageId() {
737 return _pollsQuestion.getDefaultLanguageId();
738 }
739
740 @Override
741 public void prepareLocalizedFieldsForImport()
742 throws com.liferay.portal.LocaleException {
743 _pollsQuestion.prepareLocalizedFieldsForImport();
744 }
745
746 @Override
747 public void prepareLocalizedFieldsForImport(
748 java.util.Locale defaultImportLocale)
749 throws com.liferay.portal.LocaleException {
750 _pollsQuestion.prepareLocalizedFieldsForImport(defaultImportLocale);
751 }
752
753 @Override
754 public java.lang.Object clone() {
755 return new PollsQuestionWrapper((PollsQuestion)_pollsQuestion.clone());
756 }
757
758 @Override
759 public int compareTo(
760 com.liferay.portlet.polls.model.PollsQuestion pollsQuestion) {
761 return _pollsQuestion.compareTo(pollsQuestion);
762 }
763
764 @Override
765 public int hashCode() {
766 return _pollsQuestion.hashCode();
767 }
768
769 @Override
770 public com.liferay.portal.model.CacheModel<com.liferay.portlet.polls.model.PollsQuestion> toCacheModel() {
771 return _pollsQuestion.toCacheModel();
772 }
773
774 @Override
775 public com.liferay.portlet.polls.model.PollsQuestion toEscapedModel() {
776 return new PollsQuestionWrapper(_pollsQuestion.toEscapedModel());
777 }
778
779 @Override
780 public com.liferay.portlet.polls.model.PollsQuestion toUnescapedModel() {
781 return new PollsQuestionWrapper(_pollsQuestion.toUnescapedModel());
782 }
783
784 @Override
785 public java.lang.String toString() {
786 return _pollsQuestion.toString();
787 }
788
789 @Override
790 public java.lang.String toXmlString() {
791 return _pollsQuestion.toXmlString();
792 }
793
794 @Override
795 public void persist()
796 throws com.liferay.portal.kernel.exception.SystemException {
797 _pollsQuestion.persist();
798 }
799
800 @Override
801 public java.util.List<com.liferay.portlet.polls.model.PollsChoice> getChoices()
802 throws com.liferay.portal.kernel.exception.SystemException {
803 return _pollsQuestion.getChoices();
804 }
805
806 @Override
807 public java.util.List<com.liferay.portlet.polls.model.PollsVote> getVotes()
808 throws com.liferay.portal.kernel.exception.SystemException {
809 return _pollsQuestion.getVotes();
810 }
811
812 @Override
813 public java.util.List<com.liferay.portlet.polls.model.PollsVote> getVotes(
814 int start, int end)
815 throws com.liferay.portal.kernel.exception.SystemException {
816 return _pollsQuestion.getVotes(start, end);
817 }
818
819 @Override
820 public int getVotesCount()
821 throws com.liferay.portal.kernel.exception.SystemException {
822 return _pollsQuestion.getVotesCount();
823 }
824
825 @Override
826 public boolean isExpired() {
827 return _pollsQuestion.isExpired();
828 }
829
830 @Override
831 public boolean isExpired(
832 com.liferay.portal.service.ServiceContext serviceContext,
833 java.util.Date defaultCreateDate) {
834 return _pollsQuestion.isExpired(serviceContext, defaultCreateDate);
835 }
836
837 @Override
838 public boolean equals(Object obj) {
839 if (this == obj) {
840 return true;
841 }
842
843 if (!(obj instanceof PollsQuestionWrapper)) {
844 return false;
845 }
846
847 PollsQuestionWrapper pollsQuestionWrapper = (PollsQuestionWrapper)obj;
848
849 if (Validator.equals(_pollsQuestion, pollsQuestionWrapper._pollsQuestion)) {
850 return true;
851 }
852
853 return false;
854 }
855
856 @Override
857 public StagedModelType getStagedModelType() {
858 return _pollsQuestion.getStagedModelType();
859 }
860
861
864 public PollsQuestion getWrappedPollsQuestion() {
865 return _pollsQuestion;
866 }
867
868 @Override
869 public PollsQuestion getWrappedModel() {
870 return _pollsQuestion;
871 }
872
873 @Override
874 public void resetOriginalValues() {
875 _pollsQuestion.resetOriginalValues();
876 }
877
878 private PollsQuestion _pollsQuestion;
879 }