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