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.setCompanyId(model.getCompanyId());
53          soapModel.setUserId(model.getUserId());
54          soapModel.setUserName(model.getUserName());
55          soapModel.setCreateDate(model.getCreateDate());
56          soapModel.setModifiedDate(model.getModifiedDate());
57          soapModel.setCategoryId(model.getCategoryId());
58          soapModel.setThreadId(model.getThreadId());
59          soapModel.setParentMessageId(model.getParentMessageId());
60          soapModel.setSubject(model.getSubject());
61          soapModel.setBody(model.getBody());
62          soapModel.setAttachments(model.getAttachments());
63          soapModel.setAnonymous(model.getAnonymous());
64  
65          return soapModel;
66      }
67  
68      public static MBMessageSoap[] toSoapModels(List<MBMessage> models) {
69          List<MBMessageSoap> soapModels = new ArrayList<MBMessageSoap>(models.size());
70  
71          for (MBMessage model : models) {
72              soapModels.add(toSoapModel(model));
73          }
74  
75          return soapModels.toArray(new MBMessageSoap[soapModels.size()]);
76      }
77  
78      public MBMessageSoap() {
79      }
80  
81      public long getPrimaryKey() {
82          return _messageId;
83      }
84  
85      public void setPrimaryKey(long pk) {
86          setMessageId(pk);
87      }
88  
89      public String getUuid() {
90          return _uuid;
91      }
92  
93      public void setUuid(String uuid) {
94          _uuid = uuid;
95      }
96  
97      public long getMessageId() {
98          return _messageId;
99      }
100 
101     public void setMessageId(long messageId) {
102         _messageId = messageId;
103     }
104 
105     public long getCompanyId() {
106         return _companyId;
107     }
108 
109     public void setCompanyId(long companyId) {
110         _companyId = companyId;
111     }
112 
113     public long getUserId() {
114         return _userId;
115     }
116 
117     public void setUserId(long userId) {
118         _userId = userId;
119     }
120 
121     public String getUserName() {
122         return _userName;
123     }
124 
125     public void setUserName(String userName) {
126         _userName = userName;
127     }
128 
129     public Date getCreateDate() {
130         return _createDate;
131     }
132 
133     public void setCreateDate(Date createDate) {
134         _createDate = createDate;
135     }
136 
137     public Date getModifiedDate() {
138         return _modifiedDate;
139     }
140 
141     public void setModifiedDate(Date modifiedDate) {
142         _modifiedDate = modifiedDate;
143     }
144 
145     public long getCategoryId() {
146         return _categoryId;
147     }
148 
149     public void setCategoryId(long categoryId) {
150         _categoryId = categoryId;
151     }
152 
153     public long getThreadId() {
154         return _threadId;
155     }
156 
157     public void setThreadId(long threadId) {
158         _threadId = threadId;
159     }
160 
161     public long getParentMessageId() {
162         return _parentMessageId;
163     }
164 
165     public void setParentMessageId(long parentMessageId) {
166         _parentMessageId = parentMessageId;
167     }
168 
169     public String getSubject() {
170         return _subject;
171     }
172 
173     public void setSubject(String subject) {
174         _subject = subject;
175     }
176 
177     public String getBody() {
178         return _body;
179     }
180 
181     public void setBody(String body) {
182         _body = body;
183     }
184 
185     public boolean getAttachments() {
186         return _attachments;
187     }
188 
189     public boolean isAttachments() {
190         return _attachments;
191     }
192 
193     public void setAttachments(boolean attachments) {
194         _attachments = attachments;
195     }
196 
197     public boolean getAnonymous() {
198         return _anonymous;
199     }
200 
201     public boolean isAnonymous() {
202         return _anonymous;
203     }
204 
205     public void setAnonymous(boolean anonymous) {
206         _anonymous = anonymous;
207     }
208 
209     private String _uuid;
210     private long _messageId;
211     private long _companyId;
212     private long _userId;
213     private String _userName;
214     private Date _createDate;
215     private Date _modifiedDate;
216     private long _categoryId;
217     private long _threadId;
218     private long _parentMessageId;
219     private String _subject;
220     private String _body;
221     private boolean _attachments;
222     private boolean _anonymous;
223 }