1   /**
2    * Copyright (c) 2000-2007 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 overwritten
36   * the next time is generated.
37   * </p>
38   *
39   * <p>
40   * This class is used by <code>com.liferay.portlet.messageboards.service.http.MBMessageServiceSoap</code>.
41   * </p>
42   *
43   * @author Brian Wing Shun Chan
44   *
45   * @see com.liferay.portlet.messageboards.service.http.MBMessageServiceSoap
46   *
47   */
48  public class MBMessageSoap implements Serializable {
49      public static MBMessageSoap toSoapModel(MBMessage model) {
50          MBMessageSoap soapModel = new MBMessageSoap();
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 models) {
69          List soapModels = new ArrayList(models.size());
70  
71          for (int i = 0; i < models.size(); i++) {
72              MBMessage model = (MBMessage)models.get(i);
73              soapModels.add(toSoapModel(model));
74          }
75  
76          return (MBMessageSoap[])soapModels.toArray(new MBMessageSoap[0]);
77      }
78  
79      public MBMessageSoap() {
80      }
81  
82      public long getPrimaryKey() {
83          return _messageId;
84      }
85  
86      public void setPrimaryKey(long pk) {
87          setMessageId(pk);
88      }
89  
90      public long getMessageId() {
91          return _messageId;
92      }
93  
94      public void setMessageId(long messageId) {
95          _messageId = messageId;
96      }
97  
98      public long getCompanyId() {
99          return _companyId;
100     }
101 
102     public void setCompanyId(long companyId) {
103         _companyId = companyId;
104     }
105 
106     public long getUserId() {
107         return _userId;
108     }
109 
110     public void setUserId(long userId) {
111         _userId = userId;
112     }
113 
114     public String getUserName() {
115         return _userName;
116     }
117 
118     public void setUserName(String userName) {
119         _userName = userName;
120     }
121 
122     public Date getCreateDate() {
123         return _createDate;
124     }
125 
126     public void setCreateDate(Date createDate) {
127         _createDate = createDate;
128     }
129 
130     public Date getModifiedDate() {
131         return _modifiedDate;
132     }
133 
134     public void setModifiedDate(Date modifiedDate) {
135         _modifiedDate = modifiedDate;
136     }
137 
138     public long getCategoryId() {
139         return _categoryId;
140     }
141 
142     public void setCategoryId(long categoryId) {
143         _categoryId = categoryId;
144     }
145 
146     public long getThreadId() {
147         return _threadId;
148     }
149 
150     public void setThreadId(long threadId) {
151         _threadId = threadId;
152     }
153 
154     public long getParentMessageId() {
155         return _parentMessageId;
156     }
157 
158     public void setParentMessageId(long parentMessageId) {
159         _parentMessageId = parentMessageId;
160     }
161 
162     public String getSubject() {
163         return _subject;
164     }
165 
166     public void setSubject(String subject) {
167         _subject = subject;
168     }
169 
170     public String getBody() {
171         return _body;
172     }
173 
174     public void setBody(String body) {
175         _body = body;
176     }
177 
178     public boolean getAttachments() {
179         return _attachments;
180     }
181 
182     public boolean isAttachments() {
183         return _attachments;
184     }
185 
186     public void setAttachments(boolean attachments) {
187         _attachments = attachments;
188     }
189 
190     public boolean getAnonymous() {
191         return _anonymous;
192     }
193 
194     public boolean isAnonymous() {
195         return _anonymous;
196     }
197 
198     public void setAnonymous(boolean anonymous) {
199         _anonymous = anonymous;
200     }
201 
202     private long _messageId;
203     private long _companyId;
204     private long _userId;
205     private String _userName;
206     private Date _createDate;
207     private Date _modifiedDate;
208     private long _categoryId;
209     private long _threadId;
210     private long _parentMessageId;
211     private String _subject;
212     private String _body;
213     private boolean _attachments;
214     private boolean _anonymous;
215 }