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