001
014
015 package com.liferay.portlet.polls.model;
016
017 import com.liferay.portal.model.ModelWrapper;
018
019 import java.util.HashMap;
020 import java.util.Map;
021
022
031 public class PollsChoiceWrapper implements PollsChoice,
032 ModelWrapper<PollsChoice> {
033 public PollsChoiceWrapper(PollsChoice pollsChoice) {
034 _pollsChoice = pollsChoice;
035 }
036
037 public Class<?> getModelClass() {
038 return PollsChoice.class;
039 }
040
041 public String getModelClassName() {
042 return PollsChoice.class.getName();
043 }
044
045 public Map<String, Object> getModelAttributes() {
046 Map<String, Object> attributes = new HashMap<String, Object>();
047
048 attributes.put("uuid", getUuid());
049 attributes.put("choiceId", getChoiceId());
050 attributes.put("questionId", getQuestionId());
051 attributes.put("name", getName());
052 attributes.put("description", getDescription());
053
054 return attributes;
055 }
056
057 public void setModelAttributes(Map<String, Object> attributes) {
058 String uuid = (String)attributes.get("uuid");
059
060 if (uuid != null) {
061 setUuid(uuid);
062 }
063
064 Long choiceId = (Long)attributes.get("choiceId");
065
066 if (choiceId != null) {
067 setChoiceId(choiceId);
068 }
069
070 Long questionId = (Long)attributes.get("questionId");
071
072 if (questionId != null) {
073 setQuestionId(questionId);
074 }
075
076 String name = (String)attributes.get("name");
077
078 if (name != null) {
079 setName(name);
080 }
081
082 String description = (String)attributes.get("description");
083
084 if (description != null) {
085 setDescription(description);
086 }
087 }
088
089
094 public long getPrimaryKey() {
095 return _pollsChoice.getPrimaryKey();
096 }
097
098
103 public void setPrimaryKey(long primaryKey) {
104 _pollsChoice.setPrimaryKey(primaryKey);
105 }
106
107
112 public java.lang.String getUuid() {
113 return _pollsChoice.getUuid();
114 }
115
116
121 public void setUuid(java.lang.String uuid) {
122 _pollsChoice.setUuid(uuid);
123 }
124
125
130 public long getChoiceId() {
131 return _pollsChoice.getChoiceId();
132 }
133
134
139 public void setChoiceId(long choiceId) {
140 _pollsChoice.setChoiceId(choiceId);
141 }
142
143
148 public long getQuestionId() {
149 return _pollsChoice.getQuestionId();
150 }
151
152
157 public void setQuestionId(long questionId) {
158 _pollsChoice.setQuestionId(questionId);
159 }
160
161
166 public java.lang.String getName() {
167 return _pollsChoice.getName();
168 }
169
170
175 public void setName(java.lang.String name) {
176 _pollsChoice.setName(name);
177 }
178
179
184 public java.lang.String getDescription() {
185 return _pollsChoice.getDescription();
186 }
187
188
194 public java.lang.String getDescription(java.util.Locale locale) {
195 return _pollsChoice.getDescription(locale);
196 }
197
198
205 public java.lang.String getDescription(java.util.Locale locale,
206 boolean useDefault) {
207 return _pollsChoice.getDescription(locale, useDefault);
208 }
209
210
216 public java.lang.String getDescription(java.lang.String languageId) {
217 return _pollsChoice.getDescription(languageId);
218 }
219
220
227 public java.lang.String getDescription(java.lang.String languageId,
228 boolean useDefault) {
229 return _pollsChoice.getDescription(languageId, useDefault);
230 }
231
232 public java.lang.String getDescriptionCurrentLanguageId() {
233 return _pollsChoice.getDescriptionCurrentLanguageId();
234 }
235
236 public java.lang.String getDescriptionCurrentValue() {
237 return _pollsChoice.getDescriptionCurrentValue();
238 }
239
240
245 public java.util.Map<java.util.Locale, java.lang.String> getDescriptionMap() {
246 return _pollsChoice.getDescriptionMap();
247 }
248
249
254 public void setDescription(java.lang.String description) {
255 _pollsChoice.setDescription(description);
256 }
257
258
264 public void setDescription(java.lang.String description,
265 java.util.Locale locale) {
266 _pollsChoice.setDescription(description, locale);
267 }
268
269
276 public void setDescription(java.lang.String description,
277 java.util.Locale locale, java.util.Locale defaultLocale) {
278 _pollsChoice.setDescription(description, locale, defaultLocale);
279 }
280
281 public void setDescriptionCurrentLanguageId(java.lang.String languageId) {
282 _pollsChoice.setDescriptionCurrentLanguageId(languageId);
283 }
284
285
290 public void setDescriptionMap(
291 java.util.Map<java.util.Locale, java.lang.String> descriptionMap) {
292 _pollsChoice.setDescriptionMap(descriptionMap);
293 }
294
295
301 public void setDescriptionMap(
302 java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
303 java.util.Locale defaultLocale) {
304 _pollsChoice.setDescriptionMap(descriptionMap, defaultLocale);
305 }
306
307 public boolean isNew() {
308 return _pollsChoice.isNew();
309 }
310
311 public void setNew(boolean n) {
312 _pollsChoice.setNew(n);
313 }
314
315 public boolean isCachedModel() {
316 return _pollsChoice.isCachedModel();
317 }
318
319 public void setCachedModel(boolean cachedModel) {
320 _pollsChoice.setCachedModel(cachedModel);
321 }
322
323 public boolean isEscapedModel() {
324 return _pollsChoice.isEscapedModel();
325 }
326
327 public java.io.Serializable getPrimaryKeyObj() {
328 return _pollsChoice.getPrimaryKeyObj();
329 }
330
331 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
332 _pollsChoice.setPrimaryKeyObj(primaryKeyObj);
333 }
334
335 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
336 return _pollsChoice.getExpandoBridge();
337 }
338
339 public void setExpandoBridgeAttributes(
340 com.liferay.portal.service.ServiceContext serviceContext) {
341 _pollsChoice.setExpandoBridgeAttributes(serviceContext);
342 }
343
344 public void prepareLocalizedFieldsForImport(
345 java.util.Locale defaultImportLocale)
346 throws com.liferay.portal.LocaleException {
347 _pollsChoice.prepareLocalizedFieldsForImport(defaultImportLocale);
348 }
349
350 @Override
351 public java.lang.Object clone() {
352 return new PollsChoiceWrapper((PollsChoice)_pollsChoice.clone());
353 }
354
355 public int compareTo(
356 com.liferay.portlet.polls.model.PollsChoice pollsChoice) {
357 return _pollsChoice.compareTo(pollsChoice);
358 }
359
360 @Override
361 public int hashCode() {
362 return _pollsChoice.hashCode();
363 }
364
365 public com.liferay.portal.model.CacheModel<com.liferay.portlet.polls.model.PollsChoice> toCacheModel() {
366 return _pollsChoice.toCacheModel();
367 }
368
369 public com.liferay.portlet.polls.model.PollsChoice toEscapedModel() {
370 return new PollsChoiceWrapper(_pollsChoice.toEscapedModel());
371 }
372
373 public com.liferay.portlet.polls.model.PollsChoice toUnescapedModel() {
374 return new PollsChoiceWrapper(_pollsChoice.toUnescapedModel());
375 }
376
377 @Override
378 public java.lang.String toString() {
379 return _pollsChoice.toString();
380 }
381
382 public java.lang.String toXmlString() {
383 return _pollsChoice.toXmlString();
384 }
385
386 public void persist()
387 throws com.liferay.portal.kernel.exception.SystemException {
388 _pollsChoice.persist();
389 }
390
391 public int getVotesCount()
392 throws com.liferay.portal.kernel.exception.SystemException {
393 return _pollsChoice.getVotesCount();
394 }
395
396
399 public PollsChoice getWrappedPollsChoice() {
400 return _pollsChoice;
401 }
402
403 public PollsChoice getWrappedModel() {
404 return _pollsChoice;
405 }
406
407 public void resetOriginalValues() {
408 _pollsChoice.resetOriginalValues();
409 }
410
411 private PollsChoice _pollsChoice;
412 }