1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   *
13   */
14  
15  package com.liferay.portlet.polls.model;
16  
17  import java.io.Serializable;
18  
19  import java.util.ArrayList;
20  import java.util.List;
21  
22  /**
23   * <a href="PollsChoiceSoap.java.html"><b><i>View Source</i></b></a>
24   *
25   * <p>
26   * ServiceBuilder generated this class. Modifications in this class will be
27   * overwritten the next time is generated.
28   * </p>
29   *
30   * <p>
31   * This class is used by
32   * {@link com.liferay.portlet.polls.service.http.PollsChoiceServiceSoap}.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       com.liferay.portlet.polls.service.http.PollsChoiceServiceSoap
37   * @generated
38   */
39  public class PollsChoiceSoap implements Serializable {
40      public static PollsChoiceSoap toSoapModel(PollsChoice model) {
41          PollsChoiceSoap soapModel = new PollsChoiceSoap();
42  
43          soapModel.setUuid(model.getUuid());
44          soapModel.setChoiceId(model.getChoiceId());
45          soapModel.setQuestionId(model.getQuestionId());
46          soapModel.setName(model.getName());
47          soapModel.setDescription(model.getDescription());
48  
49          return soapModel;
50      }
51  
52      public static PollsChoiceSoap[] toSoapModels(PollsChoice[] models) {
53          PollsChoiceSoap[] soapModels = new PollsChoiceSoap[models.length];
54  
55          for (int i = 0; i < models.length; i++) {
56              soapModels[i] = toSoapModel(models[i]);
57          }
58  
59          return soapModels;
60      }
61  
62      public static PollsChoiceSoap[][] toSoapModels(PollsChoice[][] models) {
63          PollsChoiceSoap[][] soapModels = null;
64  
65          if (models.length > 0) {
66              soapModels = new PollsChoiceSoap[models.length][models[0].length];
67          }
68          else {
69              soapModels = new PollsChoiceSoap[0][0];
70          }
71  
72          for (int i = 0; i < models.length; i++) {
73              soapModels[i] = toSoapModels(models[i]);
74          }
75  
76          return soapModels;
77      }
78  
79      public static PollsChoiceSoap[] toSoapModels(List<PollsChoice> models) {
80          List<PollsChoiceSoap> soapModels = new ArrayList<PollsChoiceSoap>(models.size());
81  
82          for (PollsChoice model : models) {
83              soapModels.add(toSoapModel(model));
84          }
85  
86          return soapModels.toArray(new PollsChoiceSoap[soapModels.size()]);
87      }
88  
89      public PollsChoiceSoap() {
90      }
91  
92      public long getPrimaryKey() {
93          return _choiceId;
94      }
95  
96      public void setPrimaryKey(long pk) {
97          setChoiceId(pk);
98      }
99  
100     public String getUuid() {
101         return _uuid;
102     }
103 
104     public void setUuid(String uuid) {
105         _uuid = uuid;
106     }
107 
108     public long getChoiceId() {
109         return _choiceId;
110     }
111 
112     public void setChoiceId(long choiceId) {
113         _choiceId = choiceId;
114     }
115 
116     public long getQuestionId() {
117         return _questionId;
118     }
119 
120     public void setQuestionId(long questionId) {
121         _questionId = questionId;
122     }
123 
124     public String getName() {
125         return _name;
126     }
127 
128     public void setName(String name) {
129         _name = name;
130     }
131 
132     public String getDescription() {
133         return _description;
134     }
135 
136     public void setDescription(String description) {
137         _description = description;
138     }
139 
140     private String _uuid;
141     private long _choiceId;
142     private long _questionId;
143     private String _name;
144     private String _description;
145 }