001: /**
002: * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
003: *
004: * Permission is hereby granted, free of charge, to any person obtaining a copy
005: * of this software and associated documentation files (the "Software"), to deal
006: * in the Software without restriction, including without limitation the rights
007: * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
008: * copies of the Software, and to permit persons to whom the Software is
009: * furnished to do so, subject to the following conditions:
010: *
011: * The above copyright notice and this permission notice shall be included in
012: * all copies or substantial portions of the Software.
013: *
014: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
015: * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
016: * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
017: * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
018: * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
019: * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
020: * SOFTWARE.
021: */package com.liferay.portlet.polls.model;
022:
023: import java.io.Serializable;
024:
025: import java.util.ArrayList;
026: import java.util.Date;
027: import java.util.List;
028:
029: /**
030: * <a href="PollsVoteSoap.java.html"><b><i>View Source</i></b></a>
031: *
032: * <p>
033: * ServiceBuilder generated this class. Modifications in this class will be
034: * overwritten the next time is generated.
035: * </p>
036: *
037: * <p>
038: * This class is used by
039: * <code>com.liferay.portlet.polls.service.http.PollsVoteServiceSoap</code>.
040: * </p>
041: *
042: * @author Brian Wing Shun Chan
043: *
044: * @see com.liferay.portlet.polls.service.http.PollsVoteServiceSoap
045: *
046: */
047: public class PollsVoteSoap implements Serializable {
048: public static PollsVoteSoap toSoapModel(PollsVote model) {
049: PollsVoteSoap soapModel = new PollsVoteSoap();
050:
051: soapModel.setVoteId(model.getVoteId());
052: soapModel.setUserId(model.getUserId());
053: soapModel.setQuestionId(model.getQuestionId());
054: soapModel.setChoiceId(model.getChoiceId());
055: soapModel.setVoteDate(model.getVoteDate());
056:
057: return soapModel;
058: }
059:
060: public static PollsVoteSoap[] toSoapModels(List models) {
061: List soapModels = new ArrayList(models.size());
062:
063: for (int i = 0; i < models.size(); i++) {
064: PollsVote model = (PollsVote) models.get(i);
065:
066: soapModels.add(toSoapModel(model));
067: }
068:
069: return (PollsVoteSoap[]) soapModels
070: .toArray(new PollsVoteSoap[0]);
071: }
072:
073: public PollsVoteSoap() {
074: }
075:
076: public long getPrimaryKey() {
077: return _voteId;
078: }
079:
080: public void setPrimaryKey(long pk) {
081: setVoteId(pk);
082: }
083:
084: public long getVoteId() {
085: return _voteId;
086: }
087:
088: public void setVoteId(long voteId) {
089: _voteId = voteId;
090: }
091:
092: public long getUserId() {
093: return _userId;
094: }
095:
096: public void setUserId(long userId) {
097: _userId = userId;
098: }
099:
100: public long getQuestionId() {
101: return _questionId;
102: }
103:
104: public void setQuestionId(long questionId) {
105: _questionId = questionId;
106: }
107:
108: public long getChoiceId() {
109: return _choiceId;
110: }
111:
112: public void setChoiceId(long choiceId) {
113: _choiceId = choiceId;
114: }
115:
116: public Date getVoteDate() {
117: return _voteDate;
118: }
119:
120: public void setVoteDate(Date voteDate) {
121: _voteDate = voteDate;
122: }
123:
124: private long _voteId;
125: private long _userId;
126: private long _questionId;
127: private long _choiceId;
128: private Date _voteDate;
129: }
|