001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
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     * This class is used by SOAP remote services, specifically {@link com.liferay.portlet.polls.service.http.PollsVoteServiceSoap}.
025     *
026     * @author    Brian Wing Shun Chan
027     * @see       com.liferay.portlet.polls.service.http.PollsVoteServiceSoap
028     * @generated
029     */
030    public class PollsVoteSoap implements Serializable {
031            public static PollsVoteSoap toSoapModel(PollsVote model) {
032                    PollsVoteSoap soapModel = new PollsVoteSoap();
033    
034                    soapModel.setVoteId(model.getVoteId());
035                    soapModel.setUserId(model.getUserId());
036                    soapModel.setQuestionId(model.getQuestionId());
037                    soapModel.setChoiceId(model.getChoiceId());
038                    soapModel.setVoteDate(model.getVoteDate());
039    
040                    return soapModel;
041            }
042    
043            public static PollsVoteSoap[] toSoapModels(PollsVote[] models) {
044                    PollsVoteSoap[] soapModels = new PollsVoteSoap[models.length];
045    
046                    for (int i = 0; i < models.length; i++) {
047                            soapModels[i] = toSoapModel(models[i]);
048                    }
049    
050                    return soapModels;
051            }
052    
053            public static PollsVoteSoap[][] toSoapModels(PollsVote[][] models) {
054                    PollsVoteSoap[][] soapModels = null;
055    
056                    if (models.length > 0) {
057                            soapModels = new PollsVoteSoap[models.length][models[0].length];
058                    }
059                    else {
060                            soapModels = new PollsVoteSoap[0][0];
061                    }
062    
063                    for (int i = 0; i < models.length; i++) {
064                            soapModels[i] = toSoapModels(models[i]);
065                    }
066    
067                    return soapModels;
068            }
069    
070            public static PollsVoteSoap[] toSoapModels(List<PollsVote> models) {
071                    List<PollsVoteSoap> soapModels = new ArrayList<PollsVoteSoap>(models.size());
072    
073                    for (PollsVote model : models) {
074                            soapModels.add(toSoapModel(model));
075                    }
076    
077                    return soapModels.toArray(new PollsVoteSoap[soapModels.size()]);
078            }
079    
080            public PollsVoteSoap() {
081            }
082    
083            public long getPrimaryKey() {
084                    return _voteId;
085            }
086    
087            public void setPrimaryKey(long pk) {
088                    setVoteId(pk);
089            }
090    
091            public long getVoteId() {
092                    return _voteId;
093            }
094    
095            public void setVoteId(long voteId) {
096                    _voteId = voteId;
097            }
098    
099            public long getUserId() {
100                    return _userId;
101            }
102    
103            public void setUserId(long userId) {
104                    _userId = userId;
105            }
106    
107            public long getQuestionId() {
108                    return _questionId;
109            }
110    
111            public void setQuestionId(long questionId) {
112                    _questionId = questionId;
113            }
114    
115            public long getChoiceId() {
116                    return _choiceId;
117            }
118    
119            public void setChoiceId(long choiceId) {
120                    _choiceId = choiceId;
121            }
122    
123            public Date getVoteDate() {
124                    return _voteDate;
125            }
126    
127            public void setVoteDate(Date voteDate) {
128                    _voteDate = voteDate;
129            }
130    
131            private long _voteId;
132            private long _userId;
133            private long _questionId;
134            private long _choiceId;
135            private Date _voteDate;
136    }