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("voteId", getVoteId());
049 attributes.put("companyId", getCompanyId());
050 attributes.put("userId", getUserId());
051 attributes.put("userName", getUserName());
052 attributes.put("createDate", getCreateDate());
053 attributes.put("modifiedDate", getModifiedDate());
054 attributes.put("questionId", getQuestionId());
055 attributes.put("choiceId", getChoiceId());
056 attributes.put("voteDate", getVoteDate());
057
058 return attributes;
059 }
060
061 public void setModelAttributes(Map<String, Object> attributes) {
062 Long voteId = (Long)attributes.get("voteId");
063
064 if (voteId != null) {
065 setVoteId(voteId);
066 }
067
068 Long companyId = (Long)attributes.get("companyId");
069
070 if (companyId != null) {
071 setCompanyId(companyId);
072 }
073
074 Long userId = (Long)attributes.get("userId");
075
076 if (userId != null) {
077 setUserId(userId);
078 }
079
080 String userName = (String)attributes.get("userName");
081
082 if (userName != null) {
083 setUserName(userName);
084 }
085
086 Date createDate = (Date)attributes.get("createDate");
087
088 if (createDate != null) {
089 setCreateDate(createDate);
090 }
091
092 Date modifiedDate = (Date)attributes.get("modifiedDate");
093
094 if (modifiedDate != null) {
095 setModifiedDate(modifiedDate);
096 }
097
098 Long questionId = (Long)attributes.get("questionId");
099
100 if (questionId != null) {
101 setQuestionId(questionId);
102 }
103
104 Long choiceId = (Long)attributes.get("choiceId");
105
106 if (choiceId != null) {
107 setChoiceId(choiceId);
108 }
109
110 Date voteDate = (Date)attributes.get("voteDate");
111
112 if (voteDate != null) {
113 setVoteDate(voteDate);
114 }
115 }
116
117
122 public long getPrimaryKey() {
123 return _pollsVote.getPrimaryKey();
124 }
125
126
131 public void setPrimaryKey(long primaryKey) {
132 _pollsVote.setPrimaryKey(primaryKey);
133 }
134
135
140 public long getVoteId() {
141 return _pollsVote.getVoteId();
142 }
143
144
149 public void setVoteId(long voteId) {
150 _pollsVote.setVoteId(voteId);
151 }
152
153
158 public long getCompanyId() {
159 return _pollsVote.getCompanyId();
160 }
161
162
167 public void setCompanyId(long companyId) {
168 _pollsVote.setCompanyId(companyId);
169 }
170
171
176 public long getUserId() {
177 return _pollsVote.getUserId();
178 }
179
180
185 public void setUserId(long userId) {
186 _pollsVote.setUserId(userId);
187 }
188
189
195 public java.lang.String getUserUuid()
196 throws com.liferay.portal.kernel.exception.SystemException {
197 return _pollsVote.getUserUuid();
198 }
199
200
205 public void setUserUuid(java.lang.String userUuid) {
206 _pollsVote.setUserUuid(userUuid);
207 }
208
209
214 public java.lang.String getUserName() {
215 return _pollsVote.getUserName();
216 }
217
218
223 public void setUserName(java.lang.String userName) {
224 _pollsVote.setUserName(userName);
225 }
226
227
232 public java.util.Date getCreateDate() {
233 return _pollsVote.getCreateDate();
234 }
235
236
241 public void setCreateDate(java.util.Date createDate) {
242 _pollsVote.setCreateDate(createDate);
243 }
244
245
250 public java.util.Date getModifiedDate() {
251 return _pollsVote.getModifiedDate();
252 }
253
254
259 public void setModifiedDate(java.util.Date modifiedDate) {
260 _pollsVote.setModifiedDate(modifiedDate);
261 }
262
263
268 public long getQuestionId() {
269 return _pollsVote.getQuestionId();
270 }
271
272
277 public void setQuestionId(long questionId) {
278 _pollsVote.setQuestionId(questionId);
279 }
280
281
286 public long getChoiceId() {
287 return _pollsVote.getChoiceId();
288 }
289
290
295 public void setChoiceId(long choiceId) {
296 _pollsVote.setChoiceId(choiceId);
297 }
298
299
304 public java.util.Date getVoteDate() {
305 return _pollsVote.getVoteDate();
306 }
307
308
313 public void setVoteDate(java.util.Date voteDate) {
314 _pollsVote.setVoteDate(voteDate);
315 }
316
317 public boolean isNew() {
318 return _pollsVote.isNew();
319 }
320
321 public void setNew(boolean n) {
322 _pollsVote.setNew(n);
323 }
324
325 public boolean isCachedModel() {
326 return _pollsVote.isCachedModel();
327 }
328
329 public void setCachedModel(boolean cachedModel) {
330 _pollsVote.setCachedModel(cachedModel);
331 }
332
333 public boolean isEscapedModel() {
334 return _pollsVote.isEscapedModel();
335 }
336
337 public java.io.Serializable getPrimaryKeyObj() {
338 return _pollsVote.getPrimaryKeyObj();
339 }
340
341 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
342 _pollsVote.setPrimaryKeyObj(primaryKeyObj);
343 }
344
345 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
346 return _pollsVote.getExpandoBridge();
347 }
348
349 public void setExpandoBridgeAttributes(
350 com.liferay.portal.service.ServiceContext serviceContext) {
351 _pollsVote.setExpandoBridgeAttributes(serviceContext);
352 }
353
354 @Override
355 public java.lang.Object clone() {
356 return new PollsVoteWrapper((PollsVote)_pollsVote.clone());
357 }
358
359 public int compareTo(com.liferay.portlet.polls.model.PollsVote pollsVote) {
360 return _pollsVote.compareTo(pollsVote);
361 }
362
363 @Override
364 public int hashCode() {
365 return _pollsVote.hashCode();
366 }
367
368 public com.liferay.portal.model.CacheModel<com.liferay.portlet.polls.model.PollsVote> toCacheModel() {
369 return _pollsVote.toCacheModel();
370 }
371
372 public com.liferay.portlet.polls.model.PollsVote toEscapedModel() {
373 return new PollsVoteWrapper(_pollsVote.toEscapedModel());
374 }
375
376 public com.liferay.portlet.polls.model.PollsVote toUnescapedModel() {
377 return new PollsVoteWrapper(_pollsVote.toUnescapedModel());
378 }
379
380 @Override
381 public java.lang.String toString() {
382 return _pollsVote.toString();
383 }
384
385 public java.lang.String toXmlString() {
386 return _pollsVote.toXmlString();
387 }
388
389 public void persist()
390 throws com.liferay.portal.kernel.exception.SystemException {
391 _pollsVote.persist();
392 }
393
394 public com.liferay.portlet.polls.model.PollsChoice getChoice()
395 throws com.liferay.portal.kernel.exception.PortalException,
396 com.liferay.portal.kernel.exception.SystemException {
397 return _pollsVote.getChoice();
398 }
399
400
403 public PollsVote getWrappedPollsVote() {
404 return _pollsVote;
405 }
406
407 public PollsVote getWrappedModel() {
408 return _pollsVote;
409 }
410
411 public void resetOriginalValues() {
412 _pollsVote.resetOriginalValues();
413 }
414
415 private PollsVote _pollsVote;
416 }