001    /**
002     * Copyright (c) 2000-2010 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 java.io.Serializable;
018    
019    import java.util.ArrayList;
020    import java.util.Date;
021    import java.util.List;
022    
023    /**
024     * <p>
025     * This class is used by
026     * {@link com.liferay.portlet.polls.service.http.PollsVoteServiceSoap}.
027     * </p>
028     *
029     * @author    Brian Wing Shun Chan
030     * @see       com.liferay.portlet.polls.service.http.PollsVoteServiceSoap
031     * @generated
032     */
033    public class PollsVoteSoap implements Serializable {
034            public static PollsVoteSoap toSoapModel(PollsVote model) {
035                    PollsVoteSoap soapModel = new PollsVoteSoap();
036    
037                    soapModel.setVoteId(model.getVoteId());
038                    soapModel.setUserId(model.getUserId());
039                    soapModel.setQuestionId(model.getQuestionId());
040                    soapModel.setChoiceId(model.getChoiceId());
041                    soapModel.setVoteDate(model.getVoteDate());
042    
043                    return soapModel;
044            }
045    
046            public static PollsVoteSoap[] toSoapModels(PollsVote[] models) {
047                    PollsVoteSoap[] soapModels = new PollsVoteSoap[models.length];
048    
049                    for (int i = 0; i < models.length; i++) {
050                            soapModels[i] = toSoapModel(models[i]);
051                    }
052    
053                    return soapModels;
054            }
055    
056            public static PollsVoteSoap[][] toSoapModels(PollsVote[][] models) {
057                    PollsVoteSoap[][] soapModels = null;
058    
059                    if (models.length > 0) {
060                            soapModels = new PollsVoteSoap[models.length][models[0].length];
061                    }
062                    else {
063                            soapModels = new PollsVoteSoap[0][0];
064                    }
065    
066                    for (int i = 0; i < models.length; i++) {
067                            soapModels[i] = toSoapModels(models[i]);
068                    }
069    
070                    return soapModels;
071            }
072    
073            public static PollsVoteSoap[] toSoapModels(List<PollsVote> models) {
074                    List<PollsVoteSoap> soapModels = new ArrayList<PollsVoteSoap>(models.size());
075    
076                    for (PollsVote model : models) {
077                            soapModels.add(toSoapModel(model));
078                    }
079    
080                    return soapModels.toArray(new PollsVoteSoap[soapModels.size()]);
081            }
082    
083            public PollsVoteSoap() {
084            }
085    
086            public long getPrimaryKey() {
087                    return _voteId;
088            }
089    
090            public void setPrimaryKey(long pk) {
091                    setVoteId(pk);
092            }
093    
094            public long getVoteId() {
095                    return _voteId;
096            }
097    
098            public void setVoteId(long voteId) {
099                    _voteId = voteId;
100            }
101    
102            public long getUserId() {
103                    return _userId;
104            }
105    
106            public void setUserId(long userId) {
107                    _userId = userId;
108            }
109    
110            public long getQuestionId() {
111                    return _questionId;
112            }
113    
114            public void setQuestionId(long questionId) {
115                    _questionId = questionId;
116            }
117    
118            public long getChoiceId() {
119                    return _choiceId;
120            }
121    
122            public void setChoiceId(long choiceId) {
123                    _choiceId = choiceId;
124            }
125    
126            public Date getVoteDate() {
127                    return _voteDate;
128            }
129    
130            public void setVoteDate(Date voteDate) {
131                    _voteDate = voteDate;
132            }
133    
134            private long _voteId;
135            private long _userId;
136            private long _questionId;
137            private long _choiceId;
138            private Date _voteDate;
139    }