001    /**
002     * Copyright (c) 2000-2013 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, specifically {@link com.liferay.portlet.polls.service.http.PollsChoiceServiceSoap}.
024     *
025     * @author    Brian Wing Shun Chan
026     * @see       com.liferay.portlet.polls.service.http.PollsChoiceServiceSoap
027     * @generated
028     */
029    public class PollsChoiceSoap implements Serializable {
030            public static PollsChoiceSoap toSoapModel(PollsChoice model) {
031                    PollsChoiceSoap soapModel = new PollsChoiceSoap();
032    
033                    soapModel.setUuid(model.getUuid());
034                    soapModel.setChoiceId(model.getChoiceId());
035                    soapModel.setQuestionId(model.getQuestionId());
036                    soapModel.setName(model.getName());
037                    soapModel.setDescription(model.getDescription());
038    
039                    return soapModel;
040            }
041    
042            public static PollsChoiceSoap[] toSoapModels(PollsChoice[] models) {
043                    PollsChoiceSoap[] soapModels = new PollsChoiceSoap[models.length];
044    
045                    for (int i = 0; i < models.length; i++) {
046                            soapModels[i] = toSoapModel(models[i]);
047                    }
048    
049                    return soapModels;
050            }
051    
052            public static PollsChoiceSoap[][] toSoapModels(PollsChoice[][] models) {
053                    PollsChoiceSoap[][] soapModels = null;
054    
055                    if (models.length > 0) {
056                            soapModels = new PollsChoiceSoap[models.length][models[0].length];
057                    }
058                    else {
059                            soapModels = new PollsChoiceSoap[0][0];
060                    }
061    
062                    for (int i = 0; i < models.length; i++) {
063                            soapModels[i] = toSoapModels(models[i]);
064                    }
065    
066                    return soapModels;
067            }
068    
069            public static PollsChoiceSoap[] toSoapModels(List<PollsChoice> models) {
070                    List<PollsChoiceSoap> soapModels = new ArrayList<PollsChoiceSoap>(models.size());
071    
072                    for (PollsChoice model : models) {
073                            soapModels.add(toSoapModel(model));
074                    }
075    
076                    return soapModels.toArray(new PollsChoiceSoap[soapModels.size()]);
077            }
078    
079            public PollsChoiceSoap() {
080            }
081    
082            public long getPrimaryKey() {
083                    return _choiceId;
084            }
085    
086            public void setPrimaryKey(long pk) {
087                    setChoiceId(pk);
088            }
089    
090            public String getUuid() {
091                    return _uuid;
092            }
093    
094            public void setUuid(String uuid) {
095                    _uuid = uuid;
096            }
097    
098            public long getChoiceId() {
099                    return _choiceId;
100            }
101    
102            public void setChoiceId(long choiceId) {
103                    _choiceId = choiceId;
104            }
105    
106            public long getQuestionId() {
107                    return _questionId;
108            }
109    
110            public void setQuestionId(long questionId) {
111                    _questionId = questionId;
112            }
113    
114            public String getName() {
115                    return _name;
116            }
117    
118            public void setName(String name) {
119                    _name = name;
120            }
121    
122            public String getDescription() {
123                    return _description;
124            }
125    
126            public void setDescription(String description) {
127                    _description = description;
128            }
129    
130            private String _uuid;
131            private long _choiceId;
132            private long _questionId;
133            private String _name;
134            private String _description;
135    }