001
014
015 package com.liferay.portlet.polls.model;
016
017 import com.liferay.portal.model.ModelWrapper;
018
019 import java.util.Date;
020 import java.util.HashMap;
021 import java.util.Map;
022
023
032 public class PollsChoiceWrapper implements PollsChoice,
033 ModelWrapper<PollsChoice> {
034 public PollsChoiceWrapper(PollsChoice pollsChoice) {
035 _pollsChoice = pollsChoice;
036 }
037
038 public Class<?> getModelClass() {
039 return PollsChoice.class;
040 }
041
042 public String getModelClassName() {
043 return PollsChoice.class.getName();
044 }
045
046 public Map<String, Object> getModelAttributes() {
047 Map<String, Object> attributes = new HashMap<String, Object>();
048
049 attributes.put("uuid", getUuid());
050 attributes.put("choiceId", getChoiceId());
051 attributes.put("groupId", getGroupId());
052 attributes.put("companyId", getCompanyId());
053 attributes.put("userId", getUserId());
054 attributes.put("userName", getUserName());
055 attributes.put("createDate", getCreateDate());
056 attributes.put("modifiedDate", getModifiedDate());
057 attributes.put("questionId", getQuestionId());
058 attributes.put("name", getName());
059 attributes.put("description", getDescription());
060
061 return attributes;
062 }
063
064 public void setModelAttributes(Map<String, Object> attributes) {
065 String uuid = (String)attributes.get("uuid");
066
067 if (uuid != null) {
068 setUuid(uuid);
069 }
070
071 Long choiceId = (Long)attributes.get("choiceId");
072
073 if (choiceId != null) {
074 setChoiceId(choiceId);
075 }
076
077 Long groupId = (Long)attributes.get("groupId");
078
079 if (groupId != null) {
080 setGroupId(groupId);
081 }
082
083 Long companyId = (Long)attributes.get("companyId");
084
085 if (companyId != null) {
086 setCompanyId(companyId);
087 }
088
089 Long userId = (Long)attributes.get("userId");
090
091 if (userId != null) {
092 setUserId(userId);
093 }
094
095 String userName = (String)attributes.get("userName");
096
097 if (userName != null) {
098 setUserName(userName);
099 }
100
101 Date createDate = (Date)attributes.get("createDate");
102
103 if (createDate != null) {
104 setCreateDate(createDate);
105 }
106
107 Date modifiedDate = (Date)attributes.get("modifiedDate");
108
109 if (modifiedDate != null) {
110 setModifiedDate(modifiedDate);
111 }
112
113 Long questionId = (Long)attributes.get("questionId");
114
115 if (questionId != null) {
116 setQuestionId(questionId);
117 }
118
119 String name = (String)attributes.get("name");
120
121 if (name != null) {
122 setName(name);
123 }
124
125 String description = (String)attributes.get("description");
126
127 if (description != null) {
128 setDescription(description);
129 }
130 }
131
132
137 public long getPrimaryKey() {
138 return _pollsChoice.getPrimaryKey();
139 }
140
141
146 public void setPrimaryKey(long primaryKey) {
147 _pollsChoice.setPrimaryKey(primaryKey);
148 }
149
150
155 public java.lang.String getUuid() {
156 return _pollsChoice.getUuid();
157 }
158
159
164 public void setUuid(java.lang.String uuid) {
165 _pollsChoice.setUuid(uuid);
166 }
167
168
173 public long getChoiceId() {
174 return _pollsChoice.getChoiceId();
175 }
176
177
182 public void setChoiceId(long choiceId) {
183 _pollsChoice.setChoiceId(choiceId);
184 }
185
186
191 public long getGroupId() {
192 return _pollsChoice.getGroupId();
193 }
194
195
200 public void setGroupId(long groupId) {
201 _pollsChoice.setGroupId(groupId);
202 }
203
204
209 public long getCompanyId() {
210 return _pollsChoice.getCompanyId();
211 }
212
213
218 public void setCompanyId(long companyId) {
219 _pollsChoice.setCompanyId(companyId);
220 }
221
222
227 public long getUserId() {
228 return _pollsChoice.getUserId();
229 }
230
231
236 public void setUserId(long userId) {
237 _pollsChoice.setUserId(userId);
238 }
239
240
246 public java.lang.String getUserUuid()
247 throws com.liferay.portal.kernel.exception.SystemException {
248 return _pollsChoice.getUserUuid();
249 }
250
251
256 public void setUserUuid(java.lang.String userUuid) {
257 _pollsChoice.setUserUuid(userUuid);
258 }
259
260
265 public java.lang.String getUserName() {
266 return _pollsChoice.getUserName();
267 }
268
269
274 public void setUserName(java.lang.String userName) {
275 _pollsChoice.setUserName(userName);
276 }
277
278
283 public java.util.Date getCreateDate() {
284 return _pollsChoice.getCreateDate();
285 }
286
287
292 public void setCreateDate(java.util.Date createDate) {
293 _pollsChoice.setCreateDate(createDate);
294 }
295
296
301 public java.util.Date getModifiedDate() {
302 return _pollsChoice.getModifiedDate();
303 }
304
305
310 public void setModifiedDate(java.util.Date modifiedDate) {
311 _pollsChoice.setModifiedDate(modifiedDate);
312 }
313
314
319 public long getQuestionId() {
320 return _pollsChoice.getQuestionId();
321 }
322
323
328 public void setQuestionId(long questionId) {
329 _pollsChoice.setQuestionId(questionId);
330 }
331
332
337 public java.lang.String getName() {
338 return _pollsChoice.getName();
339 }
340
341
346 public void setName(java.lang.String name) {
347 _pollsChoice.setName(name);
348 }
349
350
355 public java.lang.String getDescription() {
356 return _pollsChoice.getDescription();
357 }
358
359
365 public java.lang.String getDescription(java.util.Locale locale) {
366 return _pollsChoice.getDescription(locale);
367 }
368
369
376 public java.lang.String getDescription(java.util.Locale locale,
377 boolean useDefault) {
378 return _pollsChoice.getDescription(locale, useDefault);
379 }
380
381
387 public java.lang.String getDescription(java.lang.String languageId) {
388 return _pollsChoice.getDescription(languageId);
389 }
390
391
398 public java.lang.String getDescription(java.lang.String languageId,
399 boolean useDefault) {
400 return _pollsChoice.getDescription(languageId, useDefault);
401 }
402
403 public java.lang.String getDescriptionCurrentLanguageId() {
404 return _pollsChoice.getDescriptionCurrentLanguageId();
405 }
406
407 public java.lang.String getDescriptionCurrentValue() {
408 return _pollsChoice.getDescriptionCurrentValue();
409 }
410
411
416 public java.util.Map<java.util.Locale, java.lang.String> getDescriptionMap() {
417 return _pollsChoice.getDescriptionMap();
418 }
419
420
425 public void setDescription(java.lang.String description) {
426 _pollsChoice.setDescription(description);
427 }
428
429
435 public void setDescription(java.lang.String description,
436 java.util.Locale locale) {
437 _pollsChoice.setDescription(description, locale);
438 }
439
440
447 public void setDescription(java.lang.String description,
448 java.util.Locale locale, java.util.Locale defaultLocale) {
449 _pollsChoice.setDescription(description, locale, defaultLocale);
450 }
451
452 public void setDescriptionCurrentLanguageId(java.lang.String languageId) {
453 _pollsChoice.setDescriptionCurrentLanguageId(languageId);
454 }
455
456
461 public void setDescriptionMap(
462 java.util.Map<java.util.Locale, java.lang.String> descriptionMap) {
463 _pollsChoice.setDescriptionMap(descriptionMap);
464 }
465
466
472 public void setDescriptionMap(
473 java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
474 java.util.Locale defaultLocale) {
475 _pollsChoice.setDescriptionMap(descriptionMap, defaultLocale);
476 }
477
478 public boolean isNew() {
479 return _pollsChoice.isNew();
480 }
481
482 public void setNew(boolean n) {
483 _pollsChoice.setNew(n);
484 }
485
486 public boolean isCachedModel() {
487 return _pollsChoice.isCachedModel();
488 }
489
490 public void setCachedModel(boolean cachedModel) {
491 _pollsChoice.setCachedModel(cachedModel);
492 }
493
494 public boolean isEscapedModel() {
495 return _pollsChoice.isEscapedModel();
496 }
497
498 public java.io.Serializable getPrimaryKeyObj() {
499 return _pollsChoice.getPrimaryKeyObj();
500 }
501
502 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
503 _pollsChoice.setPrimaryKeyObj(primaryKeyObj);
504 }
505
506 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
507 return _pollsChoice.getExpandoBridge();
508 }
509
510 public void setExpandoBridgeAttributes(
511 com.liferay.portal.model.BaseModel<?> baseModel) {
512 _pollsChoice.setExpandoBridgeAttributes(baseModel);
513 }
514
515 public void setExpandoBridgeAttributes(
516 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
517 _pollsChoice.setExpandoBridgeAttributes(expandoBridge);
518 }
519
520 public void setExpandoBridgeAttributes(
521 com.liferay.portal.service.ServiceContext serviceContext) {
522 _pollsChoice.setExpandoBridgeAttributes(serviceContext);
523 }
524
525 public void prepareLocalizedFieldsForImport(
526 java.util.Locale defaultImportLocale)
527 throws com.liferay.portal.LocaleException {
528 _pollsChoice.prepareLocalizedFieldsForImport(defaultImportLocale);
529 }
530
531 @Override
532 public java.lang.Object clone() {
533 return new PollsChoiceWrapper((PollsChoice)_pollsChoice.clone());
534 }
535
536 public int compareTo(
537 com.liferay.portlet.polls.model.PollsChoice pollsChoice) {
538 return _pollsChoice.compareTo(pollsChoice);
539 }
540
541 @Override
542 public int hashCode() {
543 return _pollsChoice.hashCode();
544 }
545
546 public com.liferay.portal.model.CacheModel<com.liferay.portlet.polls.model.PollsChoice> toCacheModel() {
547 return _pollsChoice.toCacheModel();
548 }
549
550 public com.liferay.portlet.polls.model.PollsChoice toEscapedModel() {
551 return new PollsChoiceWrapper(_pollsChoice.toEscapedModel());
552 }
553
554 public com.liferay.portlet.polls.model.PollsChoice toUnescapedModel() {
555 return new PollsChoiceWrapper(_pollsChoice.toUnescapedModel());
556 }
557
558 @Override
559 public java.lang.String toString() {
560 return _pollsChoice.toString();
561 }
562
563 public java.lang.String toXmlString() {
564 return _pollsChoice.toXmlString();
565 }
566
567 public void persist()
568 throws com.liferay.portal.kernel.exception.SystemException {
569 _pollsChoice.persist();
570 }
571
572 public int getVotesCount()
573 throws com.liferay.portal.kernel.exception.SystemException {
574 return _pollsChoice.getVotesCount();
575 }
576
577
580 public PollsChoice getWrappedPollsChoice() {
581 return _pollsChoice;
582 }
583
584 public PollsChoice getWrappedModel() {
585 return _pollsChoice;
586 }
587
588 public void resetOriginalValues() {
589 _pollsChoice.resetOriginalValues();
590 }
591
592 private PollsChoice _pollsChoice;
593 }