001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
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    /**
024     * <p>
025     * This class is a wrapper for {@link PollsVote}.
026     * </p>
027     *
028     * @author    Brian Wing Shun Chan
029     * @see       PollsVote
030     * @generated
031     */
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            /**
132            * Returns the primary key of this polls vote.
133            *
134            * @return the primary key of this polls vote
135            */
136            public long getPrimaryKey() {
137                    return _pollsVote.getPrimaryKey();
138            }
139    
140            /**
141            * Sets the primary key of this polls vote.
142            *
143            * @param primaryKey the primary key of this polls vote
144            */
145            public void setPrimaryKey(long primaryKey) {
146                    _pollsVote.setPrimaryKey(primaryKey);
147            }
148    
149            /**
150            * Returns the uuid of this polls vote.
151            *
152            * @return the uuid of this polls vote
153            */
154            public java.lang.String getUuid() {
155                    return _pollsVote.getUuid();
156            }
157    
158            /**
159            * Sets the uuid of this polls vote.
160            *
161            * @param uuid the uuid of this polls vote
162            */
163            public void setUuid(java.lang.String uuid) {
164                    _pollsVote.setUuid(uuid);
165            }
166    
167            /**
168            * Returns the vote ID of this polls vote.
169            *
170            * @return the vote ID of this polls vote
171            */
172            public long getVoteId() {
173                    return _pollsVote.getVoteId();
174            }
175    
176            /**
177            * Sets the vote ID of this polls vote.
178            *
179            * @param voteId the vote ID of this polls vote
180            */
181            public void setVoteId(long voteId) {
182                    _pollsVote.setVoteId(voteId);
183            }
184    
185            /**
186            * Returns the group ID of this polls vote.
187            *
188            * @return the group ID of this polls vote
189            */
190            public long getGroupId() {
191                    return _pollsVote.getGroupId();
192            }
193    
194            /**
195            * Sets the group ID of this polls vote.
196            *
197            * @param groupId the group ID of this polls vote
198            */
199            public void setGroupId(long groupId) {
200                    _pollsVote.setGroupId(groupId);
201            }
202    
203            /**
204            * Returns the company ID of this polls vote.
205            *
206            * @return the company ID of this polls vote
207            */
208            public long getCompanyId() {
209                    return _pollsVote.getCompanyId();
210            }
211    
212            /**
213            * Sets the company ID of this polls vote.
214            *
215            * @param companyId the company ID of this polls vote
216            */
217            public void setCompanyId(long companyId) {
218                    _pollsVote.setCompanyId(companyId);
219            }
220    
221            /**
222            * Returns the user ID of this polls vote.
223            *
224            * @return the user ID of this polls vote
225            */
226            public long getUserId() {
227                    return _pollsVote.getUserId();
228            }
229    
230            /**
231            * Sets the user ID of this polls vote.
232            *
233            * @param userId the user ID of this polls vote
234            */
235            public void setUserId(long userId) {
236                    _pollsVote.setUserId(userId);
237            }
238    
239            /**
240            * Returns the user uuid of this polls vote.
241            *
242            * @return the user uuid of this polls vote
243            * @throws SystemException if a system exception occurred
244            */
245            public java.lang.String getUserUuid()
246                    throws com.liferay.portal.kernel.exception.SystemException {
247                    return _pollsVote.getUserUuid();
248            }
249    
250            /**
251            * Sets the user uuid of this polls vote.
252            *
253            * @param userUuid the user uuid of this polls vote
254            */
255            public void setUserUuid(java.lang.String userUuid) {
256                    _pollsVote.setUserUuid(userUuid);
257            }
258    
259            /**
260            * Returns the user name of this polls vote.
261            *
262            * @return the user name of this polls vote
263            */
264            public java.lang.String getUserName() {
265                    return _pollsVote.getUserName();
266            }
267    
268            /**
269            * Sets the user name of this polls vote.
270            *
271            * @param userName the user name of this polls vote
272            */
273            public void setUserName(java.lang.String userName) {
274                    _pollsVote.setUserName(userName);
275            }
276    
277            /**
278            * Returns the create date of this polls vote.
279            *
280            * @return the create date of this polls vote
281            */
282            public java.util.Date getCreateDate() {
283                    return _pollsVote.getCreateDate();
284            }
285    
286            /**
287            * Sets the create date of this polls vote.
288            *
289            * @param createDate the create date of this polls vote
290            */
291            public void setCreateDate(java.util.Date createDate) {
292                    _pollsVote.setCreateDate(createDate);
293            }
294    
295            /**
296            * Returns the modified date of this polls vote.
297            *
298            * @return the modified date of this polls vote
299            */
300            public java.util.Date getModifiedDate() {
301                    return _pollsVote.getModifiedDate();
302            }
303    
304            /**
305            * Sets the modified date of this polls vote.
306            *
307            * @param modifiedDate the modified date of this polls vote
308            */
309            public void setModifiedDate(java.util.Date modifiedDate) {
310                    _pollsVote.setModifiedDate(modifiedDate);
311            }
312    
313            /**
314            * Returns the question ID of this polls vote.
315            *
316            * @return the question ID of this polls vote
317            */
318            public long getQuestionId() {
319                    return _pollsVote.getQuestionId();
320            }
321    
322            /**
323            * Sets the question ID of this polls vote.
324            *
325            * @param questionId the question ID of this polls vote
326            */
327            public void setQuestionId(long questionId) {
328                    _pollsVote.setQuestionId(questionId);
329            }
330    
331            /**
332            * Returns the choice ID of this polls vote.
333            *
334            * @return the choice ID of this polls vote
335            */
336            public long getChoiceId() {
337                    return _pollsVote.getChoiceId();
338            }
339    
340            /**
341            * Sets the choice ID of this polls vote.
342            *
343            * @param choiceId the choice ID of this polls vote
344            */
345            public void setChoiceId(long choiceId) {
346                    _pollsVote.setChoiceId(choiceId);
347            }
348    
349            /**
350            * Returns the vote date of this polls vote.
351            *
352            * @return the vote date of this polls vote
353            */
354            public java.util.Date getVoteDate() {
355                    return _pollsVote.getVoteDate();
356            }
357    
358            /**
359            * Sets the vote date of this polls vote.
360            *
361            * @param voteDate the vote date of this polls vote
362            */
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            /**
461             * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel}
462             */
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    }