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(List<MBMessage> models) {
73          List<MBMessageSoap> soapModels = new ArrayList<MBMessageSoap>(models.size());
74  
75          for (MBMessage model : models) {
76              soapModels.add(toSoapModel(model));
77          }
78  
79          return soapModels.toArray(new MBMessageSoap[soapModels.size()]);
80      }
81  
82      public MBMessageSoap() {
83      }
84  
85      public long getPrimaryKey() {
86          return _messageId;
87      }
88  
89      public void setPrimaryKey(long pk) {
90          setMessageId(pk);
91      }
92  
93      public String getUuid() {
94          return _uuid;
95      }
96  
97      public void setUuid(String uuid) {
98          _uuid = uuid;
99      }
100 
101     public long getMessageId() {
102         return _messageId;
103     }
104 
105     public void setMessageId(long messageId) {
106         _messageId = messageId;
107     }
108 
109     public long getGroupId() {
110         return _groupId;
111     }
112 
113     public void setGroupId(long groupId) {
114         _groupId = groupId;
115     }
116 
117     public long getCompanyId() {
118         return _companyId;
119     }
120 
121     public void setCompanyId(long companyId) {
122         _companyId = companyId;
123     }
124 
125     public long getUserId() {
126         return _userId;
127     }
128 
129     public void setUserId(long userId) {
130         _userId = userId;
131     }
132 
133     public String getUserName() {
134         return _userName;
135     }
136 
137     public void setUserName(String userName) {
138         _userName = userName;
139     }
140 
141     public Date getCreateDate() {
142         return _createDate;
143     }
144 
145     public void setCreateDate(Date createDate) {
146         _createDate = createDate;
147     }
148 
149     public Date getModifiedDate() {
150         return _modifiedDate;
151     }
152 
153     public void setModifiedDate(Date modifiedDate) {
154         _modifiedDate = modifiedDate;
155     }
156 
157     public long getClassNameId() {
158         return _classNameId;
159     }
160 
161     public void setClassNameId(long classNameId) {
162         _classNameId = classNameId;
163     }
164 
165     public long getClassPK() {
166         return _classPK;
167     }
168 
169     public void setClassPK(long classPK) {
170         _classPK = classPK;
171     }
172 
173     public long getCategoryId() {
174         return _categoryId;
175     }
176 
177     public void setCategoryId(long categoryId) {
178         _categoryId = categoryId;
179     }
180 
181     public long getThreadId() {
182         return _threadId;
183     }
184 
185     public void setThreadId(long threadId) {
186         _threadId = threadId;
187     }
188 
189     public long getParentMessageId() {
190         return _parentMessageId;
191     }
192 
193     public void setParentMessageId(long parentMessageId) {
194         _parentMessageId = parentMessageId;
195     }
196 
197     public String getSubject() {
198         return _subject;
199     }
200 
201     public void setSubject(String subject) {
202         _subject = subject;
203     }
204 
205     public String getBody() {
206         return _body;
207     }
208 
209     public void setBody(String body) {
210         _body = body;
211     }
212 
213     public boolean getAttachments() {
214         return _attachments;
215     }
216 
217     public boolean isAttachments() {
218         return _attachments;
219     }
220 
221     public void setAttachments(boolean attachments) {
222         _attachments = attachments;
223     }
224 
225     public boolean getAnonymous() {
226         return _anonymous;
227     }
228 
229     public boolean isAnonymous() {
230         return _anonymous;
231     }
232 
233     public void setAnonymous(boolean anonymous) {
234         _anonymous = anonymous;
235     }
236 
237     public double getPriority() {
238         return _priority;
239     }
240 
241     public void setPriority(double priority) {
242         _priority = priority;
243     }
244 
245     private String _uuid;
246     private long _messageId;
247     private long _groupId;
248     private long _companyId;
249     private long _userId;
250     private String _userName;
251     private Date _createDate;
252     private Date _modifiedDate;
253     private long _classNameId;
254     private long _classPK;
255     private long _categoryId;
256     private long _threadId;
257     private long _parentMessageId;
258     private String _subject;
259     private String _body;
260     private boolean _attachments;
261     private boolean _anonymous;
262     private double _priority;
263 }