1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.messageboards.model;
24  
25  import java.io.Serializable;
26  
27  import java.util.ArrayList;
28  import java.util.Date;
29  import java.util.List;
30  
31  /**
32   * <a href="MBMessageSoap.java.html"><b><i>View Source</i></b></a>
33   *
34   * <p>
35   * ServiceBuilder generated this class. Modifications in this class will be
36   * overwritten the next time is generated.
37   * </p>
38   *
39   * <p>
40   * This class is used by
41   * {@link com.liferay.portlet.messageboards.service.http.MBMessageServiceSoap}.
42   * </p>
43   *
44   * @author    Brian Wing Shun Chan
45   * @see       com.liferay.portlet.messageboards.service.http.MBMessageServiceSoap
46   * @generated
47   */
48  public class MBMessageSoap implements Serializable {
49      public static MBMessageSoap toSoapModel(MBMessage model) {
50          MBMessageSoap soapModel = new MBMessageSoap();
51  
52          soapModel.setUuid(model.getUuid());
53          soapModel.setMessageId(model.getMessageId());
54          soapModel.setGroupId(model.getGroupId());
55          soapModel.setCompanyId(model.getCompanyId());
56          soapModel.setUserId(model.getUserId());
57          soapModel.setUserName(model.getUserName());
58          soapModel.setCreateDate(model.getCreateDate());
59          soapModel.setModifiedDate(model.getModifiedDate());
60          soapModel.setClassNameId(model.getClassNameId());
61          soapModel.setClassPK(model.getClassPK());
62          soapModel.setCategoryId(model.getCategoryId());
63          soapModel.setThreadId(model.getThreadId());
64          soapModel.setParentMessageId(model.getParentMessageId());
65          soapModel.setSubject(model.getSubject());
66          soapModel.setBody(model.getBody());
67          soapModel.setAttachments(model.getAttachments());
68          soapModel.setAnonymous(model.getAnonymous());
69          soapModel.setPriority(model.getPriority());
70  
71          return soapModel;
72      }
73  
74      public static MBMessageSoap[] toSoapModels(MBMessage[] models) {
75          MBMessageSoap[] soapModels = new MBMessageSoap[models.length];
76  
77          for (int i = 0; i < models.length; i++) {
78              soapModels[i] = toSoapModel(models[i]);
79          }
80  
81          return soapModels;
82      }
83  
84      public static MBMessageSoap[][] toSoapModels(MBMessage[][] models) {
85          MBMessageSoap[][] soapModels = null;
86  
87          if (models.length > 0) {
88              soapModels = new MBMessageSoap[models.length][models[0].length];
89          }
90          else {
91              soapModels = new MBMessageSoap[0][0];
92          }
93  
94          for (int i = 0; i < models.length; i++) {
95              soapModels[i] = toSoapModels(models[i]);
96          }
97  
98          return soapModels;
99      }
100 
101     public static MBMessageSoap[] toSoapModels(List<MBMessage> models) {
102         List<MBMessageSoap> soapModels = new ArrayList<MBMessageSoap>(models.size());
103 
104         for (MBMessage model : models) {
105             soapModels.add(toSoapModel(model));
106         }
107 
108         return soapModels.toArray(new MBMessageSoap[soapModels.size()]);
109     }
110 
111     public MBMessageSoap() {
112     }
113 
114     public long getPrimaryKey() {
115         return _messageId;
116     }
117 
118     public void setPrimaryKey(long pk) {
119         setMessageId(pk);
120     }
121 
122     public String getUuid() {
123         return _uuid;
124     }
125 
126     public void setUuid(String uuid) {
127         _uuid = uuid;
128     }
129 
130     public long getMessageId() {
131         return _messageId;
132     }
133 
134     public void setMessageId(long messageId) {
135         _messageId = messageId;
136     }
137 
138     public long getGroupId() {
139         return _groupId;
140     }
141 
142     public void setGroupId(long groupId) {
143         _groupId = groupId;
144     }
145 
146     public long getCompanyId() {
147         return _companyId;
148     }
149 
150     public void setCompanyId(long companyId) {
151         _companyId = companyId;
152     }
153 
154     public long getUserId() {
155         return _userId;
156     }
157 
158     public void setUserId(long userId) {
159         _userId = userId;
160     }
161 
162     public String getUserName() {
163         return _userName;
164     }
165 
166     public void setUserName(String userName) {
167         _userName = userName;
168     }
169 
170     public Date getCreateDate() {
171         return _createDate;
172     }
173 
174     public void setCreateDate(Date createDate) {
175         _createDate = createDate;
176     }
177 
178     public Date getModifiedDate() {
179         return _modifiedDate;
180     }
181 
182     public void setModifiedDate(Date modifiedDate) {
183         _modifiedDate = modifiedDate;
184     }
185 
186     public long getClassNameId() {
187         return _classNameId;
188     }
189 
190     public void setClassNameId(long classNameId) {
191         _classNameId = classNameId;
192     }
193 
194     public long getClassPK() {
195         return _classPK;
196     }
197 
198     public void setClassPK(long classPK) {
199         _classPK = classPK;
200     }
201 
202     public long getCategoryId() {
203         return _categoryId;
204     }
205 
206     public void setCategoryId(long categoryId) {
207         _categoryId = categoryId;
208     }
209 
210     public long getThreadId() {
211         return _threadId;
212     }
213 
214     public void setThreadId(long threadId) {
215         _threadId = threadId;
216     }
217 
218     public long getParentMessageId() {
219         return _parentMessageId;
220     }
221 
222     public void setParentMessageId(long parentMessageId) {
223         _parentMessageId = parentMessageId;
224     }
225 
226     public String getSubject() {
227         return _subject;
228     }
229 
230     public void setSubject(String subject) {
231         _subject = subject;
232     }
233 
234     public String getBody() {
235         return _body;
236     }
237 
238     public void setBody(String body) {
239         _body = body;
240     }
241 
242     public boolean getAttachments() {
243         return _attachments;
244     }
245 
246     public boolean isAttachments() {
247         return _attachments;
248     }
249 
250     public void setAttachments(boolean attachments) {
251         _attachments = attachments;
252     }
253 
254     public boolean getAnonymous() {
255         return _anonymous;
256     }
257 
258     public boolean isAnonymous() {
259         return _anonymous;
260     }
261 
262     public void setAnonymous(boolean anonymous) {
263         _anonymous = anonymous;
264     }
265 
266     public double getPriority() {
267         return _priority;
268     }
269 
270     public void setPriority(double priority) {
271         _priority = priority;
272     }
273 
274     private String _uuid;
275     private long _messageId;
276     private long _groupId;
277     private long _companyId;
278     private long _userId;
279     private String _userName;
280     private Date _createDate;
281     private Date _modifiedDate;
282     private long _classNameId;
283     private long _classPK;
284     private long _categoryId;
285     private long _threadId;
286     private long _parentMessageId;
287     private String _subject;
288     private String _body;
289     private boolean _attachments;
290     private boolean _anonymous;
291     private double _priority;
292 }