001
014
015 package com.liferay.portlet.polls.model;
016
017 import com.liferay.portal.kernel.util.Validator;
018 import com.liferay.portal.model.ModelWrapper;
019
020 import java.util.Date;
021 import java.util.HashMap;
022 import java.util.Map;
023
024
033 public class PollsQuestionWrapper implements PollsQuestion,
034 ModelWrapper<PollsQuestion> {
035 public PollsQuestionWrapper(PollsQuestion pollsQuestion) {
036 _pollsQuestion = pollsQuestion;
037 }
038
039 public Class<?> getModelClass() {
040 return PollsQuestion.class;
041 }
042
043 public String getModelClassName() {
044 return PollsQuestion.class.getName();
045 }
046
047 public Map<String, Object> getModelAttributes() {
048 Map<String, Object> attributes = new HashMap<String, Object>();
049
050 attributes.put("uuid", getUuid());
051 attributes.put("questionId", getQuestionId());
052 attributes.put("groupId", getGroupId());
053 attributes.put("companyId", getCompanyId());
054 attributes.put("userId", getUserId());
055 attributes.put("userName", getUserName());
056 attributes.put("createDate", getCreateDate());
057 attributes.put("modifiedDate", getModifiedDate());
058 attributes.put("title", getTitle());
059 attributes.put("description", getDescription());
060 attributes.put("expirationDate", getExpirationDate());
061 attributes.put("lastVoteDate", getLastVoteDate());
062
063 return attributes;
064 }
065
066 public void setModelAttributes(Map<String, Object> attributes) {
067 String uuid = (String)attributes.get("uuid");
068
069 if (uuid != null) {
070 setUuid(uuid);
071 }
072
073 Long questionId = (Long)attributes.get("questionId");
074
075 if (questionId != null) {
076 setQuestionId(questionId);
077 }
078
079 Long groupId = (Long)attributes.get("groupId");
080
081 if (groupId != null) {
082 setGroupId(groupId);
083 }
084
085 Long companyId = (Long)attributes.get("companyId");
086
087 if (companyId != null) {
088 setCompanyId(companyId);
089 }
090
091 Long userId = (Long)attributes.get("userId");
092
093 if (userId != null) {
094 setUserId(userId);
095 }
096
097 String userName = (String)attributes.get("userName");
098
099 if (userName != null) {
100 setUserName(userName);
101 }
102
103 Date createDate = (Date)attributes.get("createDate");
104
105 if (createDate != null) {
106 setCreateDate(createDate);
107 }
108
109 Date modifiedDate = (Date)attributes.get("modifiedDate");
110
111 if (modifiedDate != null) {
112 setModifiedDate(modifiedDate);
113 }
114
115 String title = (String)attributes.get("title");
116
117 if (title != null) {
118 setTitle(title);
119 }
120
121 String description = (String)attributes.get("description");
122
123 if (description != null) {
124 setDescription(description);
125 }
126
127 Date expirationDate = (Date)attributes.get("expirationDate");
128
129 if (expirationDate != null) {
130 setExpirationDate(expirationDate);
131 }
132
133 Date lastVoteDate = (Date)attributes.get("lastVoteDate");
134
135 if (lastVoteDate != null) {
136 setLastVoteDate(lastVoteDate);
137 }
138 }
139
140
145 public long getPrimaryKey() {
146 return _pollsQuestion.getPrimaryKey();
147 }
148
149
154 public void setPrimaryKey(long primaryKey) {
155 _pollsQuestion.setPrimaryKey(primaryKey);
156 }
157
158
163 public java.lang.String getUuid() {
164 return _pollsQuestion.getUuid();
165 }
166
167
172 public void setUuid(java.lang.String uuid) {
173 _pollsQuestion.setUuid(uuid);
174 }
175
176
181 public long getQuestionId() {
182 return _pollsQuestion.getQuestionId();
183 }
184
185
190 public void setQuestionId(long questionId) {
191 _pollsQuestion.setQuestionId(questionId);
192 }
193
194
199 public long getGroupId() {
200 return _pollsQuestion.getGroupId();
201 }
202
203
208 public void setGroupId(long groupId) {
209 _pollsQuestion.setGroupId(groupId);
210 }
211
212
217 public long getCompanyId() {
218 return _pollsQuestion.getCompanyId();
219 }
220
221
226 public void setCompanyId(long companyId) {
227 _pollsQuestion.setCompanyId(companyId);
228 }
229
230
235 public long getUserId() {
236 return _pollsQuestion.getUserId();
237 }
238
239
244 public void setUserId(long userId) {
245 _pollsQuestion.setUserId(userId);
246 }
247
248
254 public java.lang.String getUserUuid()
255 throws com.liferay.portal.kernel.exception.SystemException {
256 return _pollsQuestion.getUserUuid();
257 }
258
259
264 public void setUserUuid(java.lang.String userUuid) {
265 _pollsQuestion.setUserUuid(userUuid);
266 }
267
268
273 public java.lang.String getUserName() {
274 return _pollsQuestion.getUserName();
275 }
276
277
282 public void setUserName(java.lang.String userName) {
283 _pollsQuestion.setUserName(userName);
284 }
285
286
291 public java.util.Date getCreateDate() {
292 return _pollsQuestion.getCreateDate();
293 }
294
295
300 public void setCreateDate(java.util.Date createDate) {
301 _pollsQuestion.setCreateDate(createDate);
302 }
303
304
309 public java.util.Date getModifiedDate() {
310 return _pollsQuestion.getModifiedDate();
311 }
312
313
318 public void setModifiedDate(java.util.Date modifiedDate) {
319 _pollsQuestion.setModifiedDate(modifiedDate);
320 }
321
322
327 public java.lang.String getTitle() {
328 return _pollsQuestion.getTitle();
329 }
330
331
337 public java.lang.String getTitle(java.util.Locale locale) {
338 return _pollsQuestion.getTitle(locale);
339 }
340
341
348 public java.lang.String getTitle(java.util.Locale locale, boolean useDefault) {
349 return _pollsQuestion.getTitle(locale, useDefault);
350 }
351
352
358 public java.lang.String getTitle(java.lang.String languageId) {
359 return _pollsQuestion.getTitle(languageId);
360 }
361
362
369 public java.lang.String getTitle(java.lang.String languageId,
370 boolean useDefault) {
371 return _pollsQuestion.getTitle(languageId, useDefault);
372 }
373
374 public java.lang.String getTitleCurrentLanguageId() {
375 return _pollsQuestion.getTitleCurrentLanguageId();
376 }
377
378 public java.lang.String getTitleCurrentValue() {
379 return _pollsQuestion.getTitleCurrentValue();
380 }
381
382
387 public java.util.Map<java.util.Locale, java.lang.String> getTitleMap() {
388 return _pollsQuestion.getTitleMap();
389 }
390
391
396 public void setTitle(java.lang.String title) {
397 _pollsQuestion.setTitle(title);
398 }
399
400
406 public void setTitle(java.lang.String title, java.util.Locale locale) {
407 _pollsQuestion.setTitle(title, locale);
408 }
409
410
417 public void setTitle(java.lang.String title, java.util.Locale locale,
418 java.util.Locale defaultLocale) {
419 _pollsQuestion.setTitle(title, locale, defaultLocale);
420 }
421
422 public void setTitleCurrentLanguageId(java.lang.String languageId) {
423 _pollsQuestion.setTitleCurrentLanguageId(languageId);
424 }
425
426
431 public void setTitleMap(
432 java.util.Map<java.util.Locale, java.lang.String> titleMap) {
433 _pollsQuestion.setTitleMap(titleMap);
434 }
435
436
442 public void setTitleMap(
443 java.util.Map<java.util.Locale, java.lang.String> titleMap,
444 java.util.Locale defaultLocale) {
445 _pollsQuestion.setTitleMap(titleMap, defaultLocale);
446 }
447
448
453 public java.lang.String getDescription() {
454 return _pollsQuestion.getDescription();
455 }
456
457
463 public java.lang.String getDescription(java.util.Locale locale) {
464 return _pollsQuestion.getDescription(locale);
465 }
466
467
474 public java.lang.String getDescription(java.util.Locale locale,
475 boolean useDefault) {
476 return _pollsQuestion.getDescription(locale, useDefault);
477 }
478
479
485 public java.lang.String getDescription(java.lang.String languageId) {
486 return _pollsQuestion.getDescription(languageId);
487 }
488
489
496 public java.lang.String getDescription(java.lang.String languageId,
497 boolean useDefault) {
498 return _pollsQuestion.getDescription(languageId, useDefault);
499 }
500
501 public java.lang.String getDescriptionCurrentLanguageId() {
502 return _pollsQuestion.getDescriptionCurrentLanguageId();
503 }
504
505 public java.lang.String getDescriptionCurrentValue() {
506 return _pollsQuestion.getDescriptionCurrentValue();
507 }
508
509
514 public java.util.Map<java.util.Locale, java.lang.String> getDescriptionMap() {
515 return _pollsQuestion.getDescriptionMap();
516 }
517
518
523 public void setDescription(java.lang.String description) {
524 _pollsQuestion.setDescription(description);
525 }
526
527
533 public void setDescription(java.lang.String description,
534 java.util.Locale locale) {
535 _pollsQuestion.setDescription(description, locale);
536 }
537
538
545 public void setDescription(java.lang.String description,
546 java.util.Locale locale, java.util.Locale defaultLocale) {
547 _pollsQuestion.setDescription(description, locale, defaultLocale);
548 }
549
550 public void setDescriptionCurrentLanguageId(java.lang.String languageId) {
551 _pollsQuestion.setDescriptionCurrentLanguageId(languageId);
552 }
553
554
559 public void setDescriptionMap(
560 java.util.Map<java.util.Locale, java.lang.String> descriptionMap) {
561 _pollsQuestion.setDescriptionMap(descriptionMap);
562 }
563
564
570 public void setDescriptionMap(
571 java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
572 java.util.Locale defaultLocale) {
573 _pollsQuestion.setDescriptionMap(descriptionMap, defaultLocale);
574 }
575
576
581 public java.util.Date getExpirationDate() {
582 return _pollsQuestion.getExpirationDate();
583 }
584
585
590 public void setExpirationDate(java.util.Date expirationDate) {
591 _pollsQuestion.setExpirationDate(expirationDate);
592 }
593
594
599 public java.util.Date getLastVoteDate() {
600 return _pollsQuestion.getLastVoteDate();
601 }
602
603
608 public void setLastVoteDate(java.util.Date lastVoteDate) {
609 _pollsQuestion.setLastVoteDate(lastVoteDate);
610 }
611
612 public boolean isNew() {
613 return _pollsQuestion.isNew();
614 }
615
616 public void setNew(boolean n) {
617 _pollsQuestion.setNew(n);
618 }
619
620 public boolean isCachedModel() {
621 return _pollsQuestion.isCachedModel();
622 }
623
624 public void setCachedModel(boolean cachedModel) {
625 _pollsQuestion.setCachedModel(cachedModel);
626 }
627
628 public boolean isEscapedModel() {
629 return _pollsQuestion.isEscapedModel();
630 }
631
632 public java.io.Serializable getPrimaryKeyObj() {
633 return _pollsQuestion.getPrimaryKeyObj();
634 }
635
636 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
637 _pollsQuestion.setPrimaryKeyObj(primaryKeyObj);
638 }
639
640 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
641 return _pollsQuestion.getExpandoBridge();
642 }
643
644 public void setExpandoBridgeAttributes(
645 com.liferay.portal.service.ServiceContext serviceContext) {
646 _pollsQuestion.setExpandoBridgeAttributes(serviceContext);
647 }
648
649 public void prepareLocalizedFieldsForImport(
650 java.util.Locale defaultImportLocale)
651 throws com.liferay.portal.LocaleException {
652 _pollsQuestion.prepareLocalizedFieldsForImport(defaultImportLocale);
653 }
654
655 @Override
656 public java.lang.Object clone() {
657 return new PollsQuestionWrapper((PollsQuestion)_pollsQuestion.clone());
658 }
659
660 public int compareTo(
661 com.liferay.portlet.polls.model.PollsQuestion pollsQuestion) {
662 return _pollsQuestion.compareTo(pollsQuestion);
663 }
664
665 @Override
666 public int hashCode() {
667 return _pollsQuestion.hashCode();
668 }
669
670 public com.liferay.portal.model.CacheModel<com.liferay.portlet.polls.model.PollsQuestion> toCacheModel() {
671 return _pollsQuestion.toCacheModel();
672 }
673
674 public com.liferay.portlet.polls.model.PollsQuestion toEscapedModel() {
675 return new PollsQuestionWrapper(_pollsQuestion.toEscapedModel());
676 }
677
678 public com.liferay.portlet.polls.model.PollsQuestion toUnescapedModel() {
679 return new PollsQuestionWrapper(_pollsQuestion.toUnescapedModel());
680 }
681
682 @Override
683 public java.lang.String toString() {
684 return _pollsQuestion.toString();
685 }
686
687 public java.lang.String toXmlString() {
688 return _pollsQuestion.toXmlString();
689 }
690
691 public void persist()
692 throws com.liferay.portal.kernel.exception.SystemException {
693 _pollsQuestion.persist();
694 }
695
696 public java.util.List<com.liferay.portlet.polls.model.PollsChoice> getChoices()
697 throws com.liferay.portal.kernel.exception.SystemException {
698 return _pollsQuestion.getChoices();
699 }
700
701 public int getVotesCount()
702 throws com.liferay.portal.kernel.exception.SystemException {
703 return _pollsQuestion.getVotesCount();
704 }
705
706 public boolean isExpired() {
707 return _pollsQuestion.isExpired();
708 }
709
710 public boolean isExpired(
711 com.liferay.portal.service.ServiceContext serviceContext,
712 java.util.Date defaultCreateDate) {
713 return _pollsQuestion.isExpired(serviceContext, defaultCreateDate);
714 }
715
716 @Override
717 public boolean equals(Object obj) {
718 if (this == obj) {
719 return true;
720 }
721
722 if (!(obj instanceof PollsQuestionWrapper)) {
723 return false;
724 }
725
726 PollsQuestionWrapper pollsQuestionWrapper = (PollsQuestionWrapper)obj;
727
728 if (Validator.equals(_pollsQuestion, pollsQuestionWrapper._pollsQuestion)) {
729 return true;
730 }
731
732 return false;
733 }
734
735
738 public PollsQuestion getWrappedPollsQuestion() {
739 return _pollsQuestion;
740 }
741
742 public PollsQuestion getWrappedModel() {
743 return _pollsQuestion;
744 }
745
746 public void resetOriginalValues() {
747 _pollsQuestion.resetOriginalValues();
748 }
749
750 private PollsQuestion _pollsQuestion;
751 }