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.List;
027:
028: /**
029: * <a href="PollsChoiceSoap.java.html"><b><i>View Source</i></b></a>
030: *
031: * <p>
032: * ServiceBuilder generated this class. Modifications in this class will be
033: * overwritten the next time is generated.
034: * </p>
035: *
036: * <p>
037: * This class is used by
038: * <code>com.liferay.portlet.polls.service.http.PollsChoiceServiceSoap</code>.
039: * </p>
040: *
041: * @author Brian Wing Shun Chan
042: *
043: * @see com.liferay.portlet.polls.service.http.PollsChoiceServiceSoap
044: *
045: */
046: public class PollsChoiceSoap implements Serializable {
047: public static PollsChoiceSoap toSoapModel(PollsChoice model) {
048: PollsChoiceSoap soapModel = new PollsChoiceSoap();
049:
050: soapModel.setUuid(model.getUuid());
051: soapModel.setChoiceId(model.getChoiceId());
052: soapModel.setQuestionId(model.getQuestionId());
053: soapModel.setName(model.getName());
054: soapModel.setDescription(model.getDescription());
055:
056: return soapModel;
057: }
058:
059: public static PollsChoiceSoap[] toSoapModels(List models) {
060: List soapModels = new ArrayList(models.size());
061:
062: for (int i = 0; i < models.size(); i++) {
063: PollsChoice model = (PollsChoice) models.get(i);
064:
065: soapModels.add(toSoapModel(model));
066: }
067:
068: return (PollsChoiceSoap[]) soapModels
069: .toArray(new PollsChoiceSoap[0]);
070: }
071:
072: public PollsChoiceSoap() {
073: }
074:
075: public long getPrimaryKey() {
076: return _choiceId;
077: }
078:
079: public void setPrimaryKey(long pk) {
080: setChoiceId(pk);
081: }
082:
083: public String getUuid() {
084: return _uuid;
085: }
086:
087: public void setUuid(String uuid) {
088: _uuid = uuid;
089: }
090:
091: public long getChoiceId() {
092: return _choiceId;
093: }
094:
095: public void setChoiceId(long choiceId) {
096: _choiceId = choiceId;
097: }
098:
099: public long getQuestionId() {
100: return _questionId;
101: }
102:
103: public void setQuestionId(long questionId) {
104: _questionId = questionId;
105: }
106:
107: public String getName() {
108: return _name;
109: }
110:
111: public void setName(String name) {
112: _name = name;
113: }
114:
115: public String getDescription() {
116: return _description;
117: }
118:
119: public void setDescription(String description) {
120: _description = description;
121: }
122:
123: private String _uuid;
124: private long _choiceId;
125: private long _questionId;
126: private String _name;
127: private String _description;
128: }
|