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 PollsVoteWrapper implements PollsVote, ModelWrapper<PollsVote> {
033 public PollsVoteWrapper(PollsVote pollsVote) {
034 _pollsVote = pollsVote;
035 }
036
037 public Class<?> getModelClass() {
038 return PollsVote.class;
039 }
040
041 public String getModelClassName() {
042 return PollsVote.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("voteId", getVoteId());
050 attributes.put("groupId", getGroupId());
051 attributes.put("companyId", getCompanyId());
052 attributes.put("userId", getUserId());
053 attributes.put("userName", getUserName());
054 attributes.put("createDate", getCreateDate());
055 attributes.put("modifiedDate", getModifiedDate());
056 attributes.put("questionId", getQuestionId());
057 attributes.put("choiceId", getChoiceId());
058 attributes.put("voteDate", getVoteDate());
059
060 return attributes;
061 }
062
063 public void setModelAttributes(Map<String, Object> attributes) {
064 String uuid = (String)attributes.get("uuid");
065
066 if (uuid != null) {
067 setUuid(uuid);
068 }
069
070 Long voteId = (Long)attributes.get("voteId");
071
072 if (voteId != null) {
073 setVoteId(voteId);
074 }
075
076 Long groupId = (Long)attributes.get("groupId");
077
078 if (groupId != null) {
079 setGroupId(groupId);
080 }
081
082 Long companyId = (Long)attributes.get("companyId");
083
084 if (companyId != null) {
085 setCompanyId(companyId);
086 }
087
088 Long userId = (Long)attributes.get("userId");
089
090 if (userId != null) {
091 setUserId(userId);
092 }
093
094 String userName = (String)attributes.get("userName");
095
096 if (userName != null) {
097 setUserName(userName);
098 }
099
100 Date createDate = (Date)attributes.get("createDate");
101
102 if (createDate != null) {
103 setCreateDate(createDate);
104 }
105
106 Date modifiedDate = (Date)attributes.get("modifiedDate");
107
108 if (modifiedDate != null) {
109 setModifiedDate(modifiedDate);
110 }
111
112 Long questionId = (Long)attributes.get("questionId");
113
114 if (questionId != null) {
115 setQuestionId(questionId);
116 }
117
118 Long choiceId = (Long)attributes.get("choiceId");
119
120 if (choiceId != null) {
121 setChoiceId(choiceId);
122 }
123
124 Date voteDate = (Date)attributes.get("voteDate");
125
126 if (voteDate != null) {
127 setVoteDate(voteDate);
128 }
129 }
130
131
136 public long getPrimaryKey() {
137 return _pollsVote.getPrimaryKey();
138 }
139
140
145 public void setPrimaryKey(long primaryKey) {
146 _pollsVote.setPrimaryKey(primaryKey);
147 }
148
149
154 public java.lang.String getUuid() {
155 return _pollsVote.getUuid();
156 }
157
158
163 public void setUuid(java.lang.String uuid) {
164 _pollsVote.setUuid(uuid);
165 }
166
167
172 public long getVoteId() {
173 return _pollsVote.getVoteId();
174 }
175
176
181 public void setVoteId(long voteId) {
182 _pollsVote.setVoteId(voteId);
183 }
184
185
190 public long getGroupId() {
191 return _pollsVote.getGroupId();
192 }
193
194
199 public void setGroupId(long groupId) {
200 _pollsVote.setGroupId(groupId);
201 }
202
203
208 public long getCompanyId() {
209 return _pollsVote.getCompanyId();
210 }
211
212
217 public void setCompanyId(long companyId) {
218 _pollsVote.setCompanyId(companyId);
219 }
220
221
226 public long getUserId() {
227 return _pollsVote.getUserId();
228 }
229
230
235 public void setUserId(long userId) {
236 _pollsVote.setUserId(userId);
237 }
238
239
245 public java.lang.String getUserUuid()
246 throws com.liferay.portal.kernel.exception.SystemException {
247 return _pollsVote.getUserUuid();
248 }
249
250
255 public void setUserUuid(java.lang.String userUuid) {
256 _pollsVote.setUserUuid(userUuid);
257 }
258
259
264 public java.lang.String getUserName() {
265 return _pollsVote.getUserName();
266 }
267
268
273 public void setUserName(java.lang.String userName) {
274 _pollsVote.setUserName(userName);
275 }
276
277
282 public java.util.Date getCreateDate() {
283 return _pollsVote.getCreateDate();
284 }
285
286
291 public void setCreateDate(java.util.Date createDate) {
292 _pollsVote.setCreateDate(createDate);
293 }
294
295
300 public java.util.Date getModifiedDate() {
301 return _pollsVote.getModifiedDate();
302 }
303
304
309 public void setModifiedDate(java.util.Date modifiedDate) {
310 _pollsVote.setModifiedDate(modifiedDate);
311 }
312
313
318 public long getQuestionId() {
319 return _pollsVote.getQuestionId();
320 }
321
322
327 public void setQuestionId(long questionId) {
328 _pollsVote.setQuestionId(questionId);
329 }
330
331
336 public long getChoiceId() {
337 return _pollsVote.getChoiceId();
338 }
339
340
345 public void setChoiceId(long choiceId) {
346 _pollsVote.setChoiceId(choiceId);
347 }
348
349
354 public java.util.Date getVoteDate() {
355 return _pollsVote.getVoteDate();
356 }
357
358
363 public void setVoteDate(java.util.Date voteDate) {
364 _pollsVote.setVoteDate(voteDate);
365 }
366
367 public boolean isNew() {
368 return _pollsVote.isNew();
369 }
370
371 public void setNew(boolean n) {
372 _pollsVote.setNew(n);
373 }
374
375 public boolean isCachedModel() {
376 return _pollsVote.isCachedModel();
377 }
378
379 public void setCachedModel(boolean cachedModel) {
380 _pollsVote.setCachedModel(cachedModel);
381 }
382
383 public boolean isEscapedModel() {
384 return _pollsVote.isEscapedModel();
385 }
386
387 public java.io.Serializable getPrimaryKeyObj() {
388 return _pollsVote.getPrimaryKeyObj();
389 }
390
391 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
392 _pollsVote.setPrimaryKeyObj(primaryKeyObj);
393 }
394
395 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
396 return _pollsVote.getExpandoBridge();
397 }
398
399 public void setExpandoBridgeAttributes(
400 com.liferay.portal.model.BaseModel<?> baseModel) {
401 _pollsVote.setExpandoBridgeAttributes(baseModel);
402 }
403
404 public void setExpandoBridgeAttributes(
405 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
406 _pollsVote.setExpandoBridgeAttributes(expandoBridge);
407 }
408
409 public void setExpandoBridgeAttributes(
410 com.liferay.portal.service.ServiceContext serviceContext) {
411 _pollsVote.setExpandoBridgeAttributes(serviceContext);
412 }
413
414 @Override
415 public java.lang.Object clone() {
416 return new PollsVoteWrapper((PollsVote)_pollsVote.clone());
417 }
418
419 public int compareTo(com.liferay.portlet.polls.model.PollsVote pollsVote) {
420 return _pollsVote.compareTo(pollsVote);
421 }
422
423 @Override
424 public int hashCode() {
425 return _pollsVote.hashCode();
426 }
427
428 public com.liferay.portal.model.CacheModel<com.liferay.portlet.polls.model.PollsVote> toCacheModel() {
429 return _pollsVote.toCacheModel();
430 }
431
432 public com.liferay.portlet.polls.model.PollsVote toEscapedModel() {
433 return new PollsVoteWrapper(_pollsVote.toEscapedModel());
434 }
435
436 public com.liferay.portlet.polls.model.PollsVote toUnescapedModel() {
437 return new PollsVoteWrapper(_pollsVote.toUnescapedModel());
438 }
439
440 @Override
441 public java.lang.String toString() {
442 return _pollsVote.toString();
443 }
444
445 public java.lang.String toXmlString() {
446 return _pollsVote.toXmlString();
447 }
448
449 public void persist()
450 throws com.liferay.portal.kernel.exception.SystemException {
451 _pollsVote.persist();
452 }
453
454 public com.liferay.portlet.polls.model.PollsChoice getChoice()
455 throws com.liferay.portal.kernel.exception.PortalException,
456 com.liferay.portal.kernel.exception.SystemException {
457 return _pollsVote.getChoice();
458 }
459
460
463 public PollsVote getWrappedPollsVote() {
464 return _pollsVote;
465 }
466
467 public PollsVote getWrappedModel() {
468 return _pollsVote;
469 }
470
471 public void resetOriginalValues() {
472 _pollsVote.resetOriginalValues();
473 }
474
475 private PollsVote _pollsVote;
476 }