001
014
015 package com.liferay.portlet.polls.model;
016
017 import com.liferay.portal.kernel.lar.StagedModelType;
018 import com.liferay.portal.kernel.util.Validator;
019 import com.liferay.portal.model.ModelWrapper;
020
021 import java.util.Date;
022 import java.util.HashMap;
023 import java.util.Map;
024
025
034 public class PollsChoiceWrapper implements PollsChoice,
035 ModelWrapper<PollsChoice> {
036 public PollsChoiceWrapper(PollsChoice pollsChoice) {
037 _pollsChoice = pollsChoice;
038 }
039
040 @Override
041 public Class<?> getModelClass() {
042 return PollsChoice.class;
043 }
044
045 @Override
046 public String getModelClassName() {
047 return PollsChoice.class.getName();
048 }
049
050 @Override
051 public Map<String, Object> getModelAttributes() {
052 Map<String, Object> attributes = new HashMap<String, Object>();
053
054 attributes.put("uuid", getUuid());
055 attributes.put("choiceId", getChoiceId());
056 attributes.put("groupId", getGroupId());
057 attributes.put("companyId", getCompanyId());
058 attributes.put("userId", getUserId());
059 attributes.put("userName", getUserName());
060 attributes.put("createDate", getCreateDate());
061 attributes.put("modifiedDate", getModifiedDate());
062 attributes.put("questionId", getQuestionId());
063 attributes.put("name", getName());
064 attributes.put("description", getDescription());
065
066 return attributes;
067 }
068
069 @Override
070 public void setModelAttributes(Map<String, Object> attributes) {
071 String uuid = (String)attributes.get("uuid");
072
073 if (uuid != null) {
074 setUuid(uuid);
075 }
076
077 Long choiceId = (Long)attributes.get("choiceId");
078
079 if (choiceId != null) {
080 setChoiceId(choiceId);
081 }
082
083 Long groupId = (Long)attributes.get("groupId");
084
085 if (groupId != null) {
086 setGroupId(groupId);
087 }
088
089 Long companyId = (Long)attributes.get("companyId");
090
091 if (companyId != null) {
092 setCompanyId(companyId);
093 }
094
095 Long userId = (Long)attributes.get("userId");
096
097 if (userId != null) {
098 setUserId(userId);
099 }
100
101 String userName = (String)attributes.get("userName");
102
103 if (userName != null) {
104 setUserName(userName);
105 }
106
107 Date createDate = (Date)attributes.get("createDate");
108
109 if (createDate != null) {
110 setCreateDate(createDate);
111 }
112
113 Date modifiedDate = (Date)attributes.get("modifiedDate");
114
115 if (modifiedDate != null) {
116 setModifiedDate(modifiedDate);
117 }
118
119 Long questionId = (Long)attributes.get("questionId");
120
121 if (questionId != null) {
122 setQuestionId(questionId);
123 }
124
125 String name = (String)attributes.get("name");
126
127 if (name != null) {
128 setName(name);
129 }
130
131 String description = (String)attributes.get("description");
132
133 if (description != null) {
134 setDescription(description);
135 }
136 }
137
138
143 @Override
144 public long getPrimaryKey() {
145 return _pollsChoice.getPrimaryKey();
146 }
147
148
153 @Override
154 public void setPrimaryKey(long primaryKey) {
155 _pollsChoice.setPrimaryKey(primaryKey);
156 }
157
158
163 @Override
164 public java.lang.String getUuid() {
165 return _pollsChoice.getUuid();
166 }
167
168
173 @Override
174 public void setUuid(java.lang.String uuid) {
175 _pollsChoice.setUuid(uuid);
176 }
177
178
183 @Override
184 public long getChoiceId() {
185 return _pollsChoice.getChoiceId();
186 }
187
188
193 @Override
194 public void setChoiceId(long choiceId) {
195 _pollsChoice.setChoiceId(choiceId);
196 }
197
198
203 @Override
204 public long getGroupId() {
205 return _pollsChoice.getGroupId();
206 }
207
208
213 @Override
214 public void setGroupId(long groupId) {
215 _pollsChoice.setGroupId(groupId);
216 }
217
218
223 @Override
224 public long getCompanyId() {
225 return _pollsChoice.getCompanyId();
226 }
227
228
233 @Override
234 public void setCompanyId(long companyId) {
235 _pollsChoice.setCompanyId(companyId);
236 }
237
238
243 @Override
244 public long getUserId() {
245 return _pollsChoice.getUserId();
246 }
247
248
253 @Override
254 public void setUserId(long userId) {
255 _pollsChoice.setUserId(userId);
256 }
257
258
264 @Override
265 public java.lang.String getUserUuid()
266 throws com.liferay.portal.kernel.exception.SystemException {
267 return _pollsChoice.getUserUuid();
268 }
269
270
275 @Override
276 public void setUserUuid(java.lang.String userUuid) {
277 _pollsChoice.setUserUuid(userUuid);
278 }
279
280
285 @Override
286 public java.lang.String getUserName() {
287 return _pollsChoice.getUserName();
288 }
289
290
295 @Override
296 public void setUserName(java.lang.String userName) {
297 _pollsChoice.setUserName(userName);
298 }
299
300
305 @Override
306 public java.util.Date getCreateDate() {
307 return _pollsChoice.getCreateDate();
308 }
309
310
315 @Override
316 public void setCreateDate(java.util.Date createDate) {
317 _pollsChoice.setCreateDate(createDate);
318 }
319
320
325 @Override
326 public java.util.Date getModifiedDate() {
327 return _pollsChoice.getModifiedDate();
328 }
329
330
335 @Override
336 public void setModifiedDate(java.util.Date modifiedDate) {
337 _pollsChoice.setModifiedDate(modifiedDate);
338 }
339
340
345 @Override
346 public long getQuestionId() {
347 return _pollsChoice.getQuestionId();
348 }
349
350
355 @Override
356 public void setQuestionId(long questionId) {
357 _pollsChoice.setQuestionId(questionId);
358 }
359
360
365 @Override
366 public java.lang.String getName() {
367 return _pollsChoice.getName();
368 }
369
370
375 @Override
376 public void setName(java.lang.String name) {
377 _pollsChoice.setName(name);
378 }
379
380
385 @Override
386 public java.lang.String getDescription() {
387 return _pollsChoice.getDescription();
388 }
389
390
396 @Override
397 public java.lang.String getDescription(java.util.Locale locale) {
398 return _pollsChoice.getDescription(locale);
399 }
400
401
408 @Override
409 public java.lang.String getDescription(java.util.Locale locale,
410 boolean useDefault) {
411 return _pollsChoice.getDescription(locale, useDefault);
412 }
413
414
420 @Override
421 public java.lang.String getDescription(java.lang.String languageId) {
422 return _pollsChoice.getDescription(languageId);
423 }
424
425
432 @Override
433 public java.lang.String getDescription(java.lang.String languageId,
434 boolean useDefault) {
435 return _pollsChoice.getDescription(languageId, useDefault);
436 }
437
438 @Override
439 public java.lang.String getDescriptionCurrentLanguageId() {
440 return _pollsChoice.getDescriptionCurrentLanguageId();
441 }
442
443 @Override
444 public java.lang.String getDescriptionCurrentValue() {
445 return _pollsChoice.getDescriptionCurrentValue();
446 }
447
448
453 @Override
454 public java.util.Map<java.util.Locale, java.lang.String> getDescriptionMap() {
455 return _pollsChoice.getDescriptionMap();
456 }
457
458
463 @Override
464 public void setDescription(java.lang.String description) {
465 _pollsChoice.setDescription(description);
466 }
467
468
474 @Override
475 public void setDescription(java.lang.String description,
476 java.util.Locale locale) {
477 _pollsChoice.setDescription(description, locale);
478 }
479
480
487 @Override
488 public void setDescription(java.lang.String description,
489 java.util.Locale locale, java.util.Locale defaultLocale) {
490 _pollsChoice.setDescription(description, locale, defaultLocale);
491 }
492
493 @Override
494 public void setDescriptionCurrentLanguageId(java.lang.String languageId) {
495 _pollsChoice.setDescriptionCurrentLanguageId(languageId);
496 }
497
498
503 @Override
504 public void setDescriptionMap(
505 java.util.Map<java.util.Locale, java.lang.String> descriptionMap) {
506 _pollsChoice.setDescriptionMap(descriptionMap);
507 }
508
509
515 @Override
516 public void setDescriptionMap(
517 java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
518 java.util.Locale defaultLocale) {
519 _pollsChoice.setDescriptionMap(descriptionMap, defaultLocale);
520 }
521
522 @Override
523 public boolean isNew() {
524 return _pollsChoice.isNew();
525 }
526
527 @Override
528 public void setNew(boolean n) {
529 _pollsChoice.setNew(n);
530 }
531
532 @Override
533 public boolean isCachedModel() {
534 return _pollsChoice.isCachedModel();
535 }
536
537 @Override
538 public void setCachedModel(boolean cachedModel) {
539 _pollsChoice.setCachedModel(cachedModel);
540 }
541
542 @Override
543 public boolean isEscapedModel() {
544 return _pollsChoice.isEscapedModel();
545 }
546
547 @Override
548 public java.io.Serializable getPrimaryKeyObj() {
549 return _pollsChoice.getPrimaryKeyObj();
550 }
551
552 @Override
553 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
554 _pollsChoice.setPrimaryKeyObj(primaryKeyObj);
555 }
556
557 @Override
558 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
559 return _pollsChoice.getExpandoBridge();
560 }
561
562 @Override
563 public void setExpandoBridgeAttributes(
564 com.liferay.portal.model.BaseModel<?> baseModel) {
565 _pollsChoice.setExpandoBridgeAttributes(baseModel);
566 }
567
568 @Override
569 public void setExpandoBridgeAttributes(
570 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
571 _pollsChoice.setExpandoBridgeAttributes(expandoBridge);
572 }
573
574 @Override
575 public void setExpandoBridgeAttributes(
576 com.liferay.portal.service.ServiceContext serviceContext) {
577 _pollsChoice.setExpandoBridgeAttributes(serviceContext);
578 }
579
580 @Override
581 public java.lang.String[] getAvailableLanguageIds() {
582 return _pollsChoice.getAvailableLanguageIds();
583 }
584
585 @Override
586 public java.lang.String getDefaultLanguageId() {
587 return _pollsChoice.getDefaultLanguageId();
588 }
589
590 @Override
591 public void prepareLocalizedFieldsForImport()
592 throws com.liferay.portal.LocaleException {
593 _pollsChoice.prepareLocalizedFieldsForImport();
594 }
595
596 @Override
597 public void prepareLocalizedFieldsForImport(
598 java.util.Locale defaultImportLocale)
599 throws com.liferay.portal.LocaleException {
600 _pollsChoice.prepareLocalizedFieldsForImport(defaultImportLocale);
601 }
602
603 @Override
604 public java.lang.Object clone() {
605 return new PollsChoiceWrapper((PollsChoice)_pollsChoice.clone());
606 }
607
608 @Override
609 public int compareTo(
610 com.liferay.portlet.polls.model.PollsChoice pollsChoice) {
611 return _pollsChoice.compareTo(pollsChoice);
612 }
613
614 @Override
615 public int hashCode() {
616 return _pollsChoice.hashCode();
617 }
618
619 @Override
620 public com.liferay.portal.model.CacheModel<com.liferay.portlet.polls.model.PollsChoice> toCacheModel() {
621 return _pollsChoice.toCacheModel();
622 }
623
624 @Override
625 public com.liferay.portlet.polls.model.PollsChoice toEscapedModel() {
626 return new PollsChoiceWrapper(_pollsChoice.toEscapedModel());
627 }
628
629 @Override
630 public com.liferay.portlet.polls.model.PollsChoice toUnescapedModel() {
631 return new PollsChoiceWrapper(_pollsChoice.toUnescapedModel());
632 }
633
634 @Override
635 public java.lang.String toString() {
636 return _pollsChoice.toString();
637 }
638
639 @Override
640 public java.lang.String toXmlString() {
641 return _pollsChoice.toXmlString();
642 }
643
644 @Override
645 public void persist()
646 throws com.liferay.portal.kernel.exception.SystemException {
647 _pollsChoice.persist();
648 }
649
650 @Override
651 public int getVotesCount()
652 throws com.liferay.portal.kernel.exception.SystemException {
653 return _pollsChoice.getVotesCount();
654 }
655
656 @Override
657 public boolean equals(Object obj) {
658 if (this == obj) {
659 return true;
660 }
661
662 if (!(obj instanceof PollsChoiceWrapper)) {
663 return false;
664 }
665
666 PollsChoiceWrapper pollsChoiceWrapper = (PollsChoiceWrapper)obj;
667
668 if (Validator.equals(_pollsChoice, pollsChoiceWrapper._pollsChoice)) {
669 return true;
670 }
671
672 return false;
673 }
674
675 @Override
676 public StagedModelType getStagedModelType() {
677 return _pollsChoice.getStagedModelType();
678 }
679
680
683 public PollsChoice getWrappedPollsChoice() {
684 return _pollsChoice;
685 }
686
687 @Override
688 public PollsChoice getWrappedModel() {
689 return _pollsChoice;
690 }
691
692 @Override
693 public void resetOriginalValues() {
694 _pollsChoice.resetOriginalValues();
695 }
696
697 private PollsChoice _pollsChoice;
698 }