001
014
015 package com.liferay.portlet.polls.model;
016
017 import com.liferay.portal.kernel.util.Validator;
018 import com.liferay.portal.model.ModelWrapper;
019
020 import java.util.Date;
021 import java.util.HashMap;
022 import java.util.Map;
023
024
033 public class PollsVoteWrapper implements PollsVote, ModelWrapper<PollsVote> {
034 public PollsVoteWrapper(PollsVote pollsVote) {
035 _pollsVote = pollsVote;
036 }
037
038 public Class<?> getModelClass() {
039 return PollsVote.class;
040 }
041
042 public String getModelClassName() {
043 return PollsVote.class.getName();
044 }
045
046 public Map<String, Object> getModelAttributes() {
047 Map<String, Object> attributes = new HashMap<String, Object>();
048
049 attributes.put("voteId", getVoteId());
050 attributes.put("companyId", getCompanyId());
051 attributes.put("userId", getUserId());
052 attributes.put("userName", getUserName());
053 attributes.put("createDate", getCreateDate());
054 attributes.put("modifiedDate", getModifiedDate());
055 attributes.put("questionId", getQuestionId());
056 attributes.put("choiceId", getChoiceId());
057 attributes.put("voteDate", getVoteDate());
058
059 return attributes;
060 }
061
062 public void setModelAttributes(Map<String, Object> attributes) {
063 Long voteId = (Long)attributes.get("voteId");
064
065 if (voteId != null) {
066 setVoteId(voteId);
067 }
068
069 Long companyId = (Long)attributes.get("companyId");
070
071 if (companyId != null) {
072 setCompanyId(companyId);
073 }
074
075 Long userId = (Long)attributes.get("userId");
076
077 if (userId != null) {
078 setUserId(userId);
079 }
080
081 String userName = (String)attributes.get("userName");
082
083 if (userName != null) {
084 setUserName(userName);
085 }
086
087 Date createDate = (Date)attributes.get("createDate");
088
089 if (createDate != null) {
090 setCreateDate(createDate);
091 }
092
093 Date modifiedDate = (Date)attributes.get("modifiedDate");
094
095 if (modifiedDate != null) {
096 setModifiedDate(modifiedDate);
097 }
098
099 Long questionId = (Long)attributes.get("questionId");
100
101 if (questionId != null) {
102 setQuestionId(questionId);
103 }
104
105 Long choiceId = (Long)attributes.get("choiceId");
106
107 if (choiceId != null) {
108 setChoiceId(choiceId);
109 }
110
111 Date voteDate = (Date)attributes.get("voteDate");
112
113 if (voteDate != null) {
114 setVoteDate(voteDate);
115 }
116 }
117
118
123 public long getPrimaryKey() {
124 return _pollsVote.getPrimaryKey();
125 }
126
127
132 public void setPrimaryKey(long primaryKey) {
133 _pollsVote.setPrimaryKey(primaryKey);
134 }
135
136
141 public long getVoteId() {
142 return _pollsVote.getVoteId();
143 }
144
145
150 public void setVoteId(long voteId) {
151 _pollsVote.setVoteId(voteId);
152 }
153
154
159 public long getCompanyId() {
160 return _pollsVote.getCompanyId();
161 }
162
163
168 public void setCompanyId(long companyId) {
169 _pollsVote.setCompanyId(companyId);
170 }
171
172
177 public long getUserId() {
178 return _pollsVote.getUserId();
179 }
180
181
186 public void setUserId(long userId) {
187 _pollsVote.setUserId(userId);
188 }
189
190
196 public java.lang.String getUserUuid()
197 throws com.liferay.portal.kernel.exception.SystemException {
198 return _pollsVote.getUserUuid();
199 }
200
201
206 public void setUserUuid(java.lang.String userUuid) {
207 _pollsVote.setUserUuid(userUuid);
208 }
209
210
215 public java.lang.String getUserName() {
216 return _pollsVote.getUserName();
217 }
218
219
224 public void setUserName(java.lang.String userName) {
225 _pollsVote.setUserName(userName);
226 }
227
228
233 public java.util.Date getCreateDate() {
234 return _pollsVote.getCreateDate();
235 }
236
237
242 public void setCreateDate(java.util.Date createDate) {
243 _pollsVote.setCreateDate(createDate);
244 }
245
246
251 public java.util.Date getModifiedDate() {
252 return _pollsVote.getModifiedDate();
253 }
254
255
260 public void setModifiedDate(java.util.Date modifiedDate) {
261 _pollsVote.setModifiedDate(modifiedDate);
262 }
263
264
269 public long getQuestionId() {
270 return _pollsVote.getQuestionId();
271 }
272
273
278 public void setQuestionId(long questionId) {
279 _pollsVote.setQuestionId(questionId);
280 }
281
282
287 public long getChoiceId() {
288 return _pollsVote.getChoiceId();
289 }
290
291
296 public void setChoiceId(long choiceId) {
297 _pollsVote.setChoiceId(choiceId);
298 }
299
300
305 public java.util.Date getVoteDate() {
306 return _pollsVote.getVoteDate();
307 }
308
309
314 public void setVoteDate(java.util.Date voteDate) {
315 _pollsVote.setVoteDate(voteDate);
316 }
317
318 public boolean isNew() {
319 return _pollsVote.isNew();
320 }
321
322 public void setNew(boolean n) {
323 _pollsVote.setNew(n);
324 }
325
326 public boolean isCachedModel() {
327 return _pollsVote.isCachedModel();
328 }
329
330 public void setCachedModel(boolean cachedModel) {
331 _pollsVote.setCachedModel(cachedModel);
332 }
333
334 public boolean isEscapedModel() {
335 return _pollsVote.isEscapedModel();
336 }
337
338 public java.io.Serializable getPrimaryKeyObj() {
339 return _pollsVote.getPrimaryKeyObj();
340 }
341
342 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
343 _pollsVote.setPrimaryKeyObj(primaryKeyObj);
344 }
345
346 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
347 return _pollsVote.getExpandoBridge();
348 }
349
350 public void setExpandoBridgeAttributes(
351 com.liferay.portal.service.ServiceContext serviceContext) {
352 _pollsVote.setExpandoBridgeAttributes(serviceContext);
353 }
354
355 @Override
356 public java.lang.Object clone() {
357 return new PollsVoteWrapper((PollsVote)_pollsVote.clone());
358 }
359
360 public int compareTo(com.liferay.portlet.polls.model.PollsVote pollsVote) {
361 return _pollsVote.compareTo(pollsVote);
362 }
363
364 @Override
365 public int hashCode() {
366 return _pollsVote.hashCode();
367 }
368
369 public com.liferay.portal.model.CacheModel<com.liferay.portlet.polls.model.PollsVote> toCacheModel() {
370 return _pollsVote.toCacheModel();
371 }
372
373 public com.liferay.portlet.polls.model.PollsVote toEscapedModel() {
374 return new PollsVoteWrapper(_pollsVote.toEscapedModel());
375 }
376
377 public com.liferay.portlet.polls.model.PollsVote toUnescapedModel() {
378 return new PollsVoteWrapper(_pollsVote.toUnescapedModel());
379 }
380
381 @Override
382 public java.lang.String toString() {
383 return _pollsVote.toString();
384 }
385
386 public java.lang.String toXmlString() {
387 return _pollsVote.toXmlString();
388 }
389
390 public void persist()
391 throws com.liferay.portal.kernel.exception.SystemException {
392 _pollsVote.persist();
393 }
394
395 public com.liferay.portlet.polls.model.PollsChoice getChoice()
396 throws com.liferay.portal.kernel.exception.PortalException,
397 com.liferay.portal.kernel.exception.SystemException {
398 return _pollsVote.getChoice();
399 }
400
401 @Override
402 public boolean equals(Object obj) {
403 if (this == obj) {
404 return true;
405 }
406
407 if (!(obj instanceof PollsVoteWrapper)) {
408 return false;
409 }
410
411 PollsVoteWrapper pollsVoteWrapper = (PollsVoteWrapper)obj;
412
413 if (Validator.equals(_pollsVote, pollsVoteWrapper._pollsVote)) {
414 return true;
415 }
416
417 return false;
418 }
419
420
423 public PollsVote getWrappedPollsVote() {
424 return _pollsVote;
425 }
426
427 public PollsVote getWrappedModel() {
428 return _pollsVote;
429 }
430
431 public void resetOriginalValues() {
432 _pollsVote.resetOriginalValues();
433 }
434
435 private PollsVote _pollsVote;
436 }