1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions 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   * <code>com.liferay.portlet.messageboards.service.http.MBMessageServiceSoap</code>.
42   * </p>
43   *
44   * @author Brian Wing Shun Chan
45   *
46   * @see com.liferay.portlet.messageboards.service.http.MBMessageServiceSoap
47   *
48   */
49  public class MBMessageSoap implements Serializable {
50      public static MBMessageSoap toSoapModel(MBMessage model) {
51          MBMessageSoap soapModel = new MBMessageSoap();
52  
53          soapModel.setUuid(model.getUuid());
54          soapModel.setMessageId(model.getMessageId());
55          soapModel.setGroupId(model.getGroupId());
56          soapModel.setCompanyId(model.getCompanyId());
57          soapModel.setUserId(model.getUserId());
58          soapModel.setUserName(model.getUserName());
59          soapModel.setCreateDate(model.getCreateDate());
60          soapModel.setModifiedDate(model.getModifiedDate());
61          soapModel.setClassNameId(model.getClassNameId());
62          soapModel.setClassPK(model.getClassPK());
63          soapModel.setCategoryId(model.getCategoryId());
64          soapModel.setThreadId(model.getThreadId());
65          soapModel.setParentMessageId(model.getParentMessageId());
66          soapModel.setSubject(model.getSubject());
67          soapModel.setBody(model.getBody());
68          soapModel.setAttachments(model.getAttachments());
69          soapModel.setAnonymous(model.getAnonymous());
70          soapModel.setPriority(model.getPriority());
71  
72          return soapModel;
73      }
74  
75      public static MBMessageSoap[] toSoapModels(MBMessage[] models) {
76          MBMessageSoap[] soapModels = new MBMessageSoap[models.length];
77  
78          for (int i = 0; i < models.length; i++) {
79              soapModels[i] = toSoapModel(models[i]);
80          }
81  
82          return soapModels;
83      }
84  
85      public static MBMessageSoap[][] toSoapModels(MBMessage[][] models) {
86          MBMessageSoap[][] soapModels = null;
87  
88          if (models.length > 0) {
89              soapModels = new MBMessageSoap[models.length][models[0].length];
90          }
91          else {
92              soapModels = new MBMessageSoap[0][0];
93          }
94  
95          for (int i = 0; i < models.length; i++) {
96              soapModels[i] = toSoapModels(models[i]);
97          }
98  
99          return soapModels;
100     }
101 
102     public static MBMessageSoap[] toSoapModels(List<MBMessage> models) {
103         List<MBMessageSoap> soapModels = new ArrayList<MBMessageSoap>(models.size());
104 
105         for (MBMessage model : models) {
106             soapModels.add(toSoapModel(model));
107         }
108 
109         return soapModels.toArray(new MBMessageSoap[soapModels.size()]);
110     }
111 
112     public MBMessageSoap() {
113     }
114 
115     public long getPrimaryKey() {
116         return _messageId;
117     }
118 
119     public void setPrimaryKey(long pk) {
120         setMessageId(pk);
121     }
122 
123     public String getUuid() {
124         return _uuid;
125     }
126 
127     public void setUuid(String uuid) {
128         _uuid = uuid;
129     }
130 
131     public long getMessageId() {
132         return _messageId;
133     }
134 
135     public void setMessageId(long messageId) {
136         _messageId = messageId;
137     }
138 
139     public long getGroupId() {
140         return _groupId;
141     }
142 
143     public void setGroupId(long groupId) {
144         _groupId = groupId;
145     }
146 
147     public long getCompanyId() {
148         return _companyId;
149     }
150 
151     public void setCompanyId(long companyId) {
152         _companyId = companyId;
153     }
154 
155     public long getUserId() {
156         return _userId;
157     }
158 
159     public void setUserId(long userId) {
160         _userId = userId;
161     }
162 
163     public String getUserName() {
164         return _userName;
165     }
166 
167     public void setUserName(String userName) {
168         _userName = userName;
169     }
170 
171     public Date getCreateDate() {
172         return _createDate;
173     }
174 
175     public void setCreateDate(Date createDate) {
176         _createDate = createDate;
177     }
178 
179     public Date getModifiedDate() {
180         return _modifiedDate;
181     }
182 
183     public void setModifiedDate(Date modifiedDate) {
184         _modifiedDate = modifiedDate;
185     }
186 
187     public long getClassNameId() {
188         return _classNameId;
189     }
190 
191     public void setClassNameId(long classNameId) {
192         _classNameId = classNameId;
193     }
194 
195     public long getClassPK() {
196         return _classPK;
197     }
198 
199     public void setClassPK(long classPK) {
200         _classPK = classPK;
201     }
202 
203     public long getCategoryId() {
204         return _categoryId;
205     }
206 
207     public void setCategoryId(long categoryId) {
208         _categoryId = categoryId;
209     }
210 
211     public long getThreadId() {
212         return _threadId;
213     }
214 
215     public void setThreadId(long threadId) {
216         _threadId = threadId;
217     }
218 
219     public long getParentMessageId() {
220         return _parentMessageId;
221     }
222 
223     public void setParentMessageId(long parentMessageId) {
224         _parentMessageId = parentMessageId;
225     }
226 
227     public String getSubject() {
228         return _subject;
229     }
230 
231     public void setSubject(String subject) {
232         _subject = subject;
233     }
234 
235     public String getBody() {
236         return _body;
237     }
238 
239     public void setBody(String body) {
240         _body = body;
241     }
242 
243     public boolean getAttachments() {
244         return _attachments;
245     }
246 
247     public boolean isAttachments() {
248         return _attachments;
249     }
250 
251     public void setAttachments(boolean attachments) {
252         _attachments = attachments;
253     }
254 
255     public boolean getAnonymous() {
256         return _anonymous;
257     }
258 
259     public boolean isAnonymous() {
260         return _anonymous;
261     }
262 
263     public void setAnonymous(boolean anonymous) {
264         _anonymous = anonymous;
265     }
266 
267     public double getPriority() {
268         return _priority;
269     }
270 
271     public void setPriority(double priority) {
272         _priority = priority;
273     }
274 
275     private String _uuid;
276     private long _messageId;
277     private long _groupId;
278     private long _companyId;
279     private long _userId;
280     private String _userName;
281     private Date _createDate;
282     private Date _modifiedDate;
283     private long _classNameId;
284     private long _classPK;
285     private long _categoryId;
286     private long _threadId;
287     private long _parentMessageId;
288     private String _subject;
289     private String _body;
290     private boolean _attachments;
291     private boolean _anonymous;
292     private double _priority;
293 }