1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.polls.model;
24  
25  import java.io.Serializable;
26  
27  import java.util.ArrayList;
28  import java.util.Date;
29  import java.util.List;
30  
31  /**
32   * <a href="PollsVoteSoap.java.html"><b><i>View Source</i></b></a>
33   *
34   * <p>
35   * ServiceBuilder generated this class. Modifications in this class will be
36   * overwritten the next time is generated.
37   * </p>
38   *
39   * <p>
40   * This class is used by
41   * {@link com.liferay.portlet.polls.service.http.PollsVoteServiceSoap}.
42   * </p>
43   *
44   * @author    Brian Wing Shun Chan
45   * @see       com.liferay.portlet.polls.service.http.PollsVoteServiceSoap
46   * @generated
47   */
48  public class PollsVoteSoap implements Serializable {
49      public static PollsVoteSoap toSoapModel(PollsVote model) {
50          PollsVoteSoap soapModel = new PollsVoteSoap();
51  
52          soapModel.setVoteId(model.getVoteId());
53          soapModel.setUserId(model.getUserId());
54          soapModel.setQuestionId(model.getQuestionId());
55          soapModel.setChoiceId(model.getChoiceId());
56          soapModel.setVoteDate(model.getVoteDate());
57  
58          return soapModel;
59      }
60  
61      public static PollsVoteSoap[] toSoapModels(PollsVote[] models) {
62          PollsVoteSoap[] soapModels = new PollsVoteSoap[models.length];
63  
64          for (int i = 0; i < models.length; i++) {
65              soapModels[i] = toSoapModel(models[i]);
66          }
67  
68          return soapModels;
69      }
70  
71      public static PollsVoteSoap[][] toSoapModels(PollsVote[][] models) {
72          PollsVoteSoap[][] soapModels = null;
73  
74          if (models.length > 0) {
75              soapModels = new PollsVoteSoap[models.length][models[0].length];
76          }
77          else {
78              soapModels = new PollsVoteSoap[0][0];
79          }
80  
81          for (int i = 0; i < models.length; i++) {
82              soapModels[i] = toSoapModels(models[i]);
83          }
84  
85          return soapModels;
86      }
87  
88      public static PollsVoteSoap[] toSoapModels(List<PollsVote> models) {
89          List<PollsVoteSoap> soapModels = new ArrayList<PollsVoteSoap>(models.size());
90  
91          for (PollsVote model : models) {
92              soapModels.add(toSoapModel(model));
93          }
94  
95          return soapModels.toArray(new PollsVoteSoap[soapModels.size()]);
96      }
97  
98      public PollsVoteSoap() {
99      }
100 
101     public long getPrimaryKey() {
102         return _voteId;
103     }
104 
105     public void setPrimaryKey(long pk) {
106         setVoteId(pk);
107     }
108 
109     public long getVoteId() {
110         return _voteId;
111     }
112 
113     public void setVoteId(long voteId) {
114         _voteId = voteId;
115     }
116 
117     public long getUserId() {
118         return _userId;
119     }
120 
121     public void setUserId(long userId) {
122         _userId = userId;
123     }
124 
125     public long getQuestionId() {
126         return _questionId;
127     }
128 
129     public void setQuestionId(long questionId) {
130         _questionId = questionId;
131     }
132 
133     public long getChoiceId() {
134         return _choiceId;
135     }
136 
137     public void setChoiceId(long choiceId) {
138         _choiceId = choiceId;
139     }
140 
141     public Date getVoteDate() {
142         return _voteDate;
143     }
144 
145     public void setVoteDate(Date voteDate) {
146         _voteDate = voteDate;
147     }
148 
149     private long _voteId;
150     private long _userId;
151     private long _questionId;
152     private long _choiceId;
153     private Date _voteDate;
154 }