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