001    /**
002     * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
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.List;
021    
022    /**
023     * This class is used by SOAP remote services.
024     *
025     * @author    Brian Wing Shun Chan
026     * @generated
027     */
028    public class PollsChoiceSoap implements Serializable {
029            public static PollsChoiceSoap toSoapModel(PollsChoice model) {
030                    PollsChoiceSoap soapModel = new PollsChoiceSoap();
031    
032                    soapModel.setUuid(model.getUuid());
033                    soapModel.setChoiceId(model.getChoiceId());
034                    soapModel.setQuestionId(model.getQuestionId());
035                    soapModel.setName(model.getName());
036                    soapModel.setDescription(model.getDescription());
037    
038                    return soapModel;
039            }
040    
041            public static PollsChoiceSoap[] toSoapModels(PollsChoice[] models) {
042                    PollsChoiceSoap[] soapModels = new PollsChoiceSoap[models.length];
043    
044                    for (int i = 0; i < models.length; i++) {
045                            soapModels[i] = toSoapModel(models[i]);
046                    }
047    
048                    return soapModels;
049            }
050    
051            public static PollsChoiceSoap[][] toSoapModels(PollsChoice[][] models) {
052                    PollsChoiceSoap[][] soapModels = null;
053    
054                    if (models.length > 0) {
055                            soapModels = new PollsChoiceSoap[models.length][models[0].length];
056                    }
057                    else {
058                            soapModels = new PollsChoiceSoap[0][0];
059                    }
060    
061                    for (int i = 0; i < models.length; i++) {
062                            soapModels[i] = toSoapModels(models[i]);
063                    }
064    
065                    return soapModels;
066            }
067    
068            public static PollsChoiceSoap[] toSoapModels(List<PollsChoice> models) {
069                    List<PollsChoiceSoap> soapModels = new ArrayList<PollsChoiceSoap>(models.size());
070    
071                    for (PollsChoice model : models) {
072                            soapModels.add(toSoapModel(model));
073                    }
074    
075                    return soapModels.toArray(new PollsChoiceSoap[soapModels.size()]);
076            }
077    
078            public PollsChoiceSoap() {
079            }
080    
081            public long getPrimaryKey() {
082                    return _choiceId;
083            }
084    
085            public void setPrimaryKey(long pk) {
086                    setChoiceId(pk);
087            }
088    
089            public String getUuid() {
090                    return _uuid;
091            }
092    
093            public void setUuid(String uuid) {
094                    _uuid = uuid;
095            }
096    
097            public long getChoiceId() {
098                    return _choiceId;
099            }
100    
101            public void setChoiceId(long choiceId) {
102                    _choiceId = choiceId;
103            }
104    
105            public long getQuestionId() {
106                    return _questionId;
107            }
108    
109            public void setQuestionId(long questionId) {
110                    _questionId = questionId;
111            }
112    
113            public String getName() {
114                    return _name;
115            }
116    
117            public void setName(String name) {
118                    _name = name;
119            }
120    
121            public String getDescription() {
122                    return _description;
123            }
124    
125            public void setDescription(String description) {
126                    _description = description;
127            }
128    
129            private String _uuid;
130            private long _choiceId;
131            private long _questionId;
132            private String _name;
133            private String _description;
134    }