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="MBCategorySoap.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.MBCategoryServiceSoap</code>.
39   * </p>
40   *
41   * @author Brian Wing Shun Chan
42   *
43   * @see com.liferay.portlet.messageboards.service.http.MBCategoryServiceSoap
44   *
45   */
46  public class MBCategorySoap implements Serializable {
47      public static MBCategorySoap toSoapModel(MBCategory model) {
48          MBCategorySoap soapModel = new MBCategorySoap();
49  
50          soapModel.setUuid(model.getUuid());
51          soapModel.setCategoryId(model.getCategoryId());
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.setParentCategoryId(model.getParentCategoryId());
59          soapModel.setName(model.getName());
60          soapModel.setDescription(model.getDescription());
61          soapModel.setThreadCount(model.getThreadCount());
62          soapModel.setMessageCount(model.getMessageCount());
63          soapModel.setLastPostDate(model.getLastPostDate());
64  
65          return soapModel;
66      }
67  
68      public static MBCategorySoap[] toSoapModels(MBCategory[] models) {
69          MBCategorySoap[] soapModels = new MBCategorySoap[models.length];
70  
71          for (int i = 0; i < models.length; i++) {
72              soapModels[i] = toSoapModel(models[i]);
73          }
74  
75          return soapModels;
76      }
77  
78      public static MBCategorySoap[][] toSoapModels(MBCategory[][] models) {
79          MBCategorySoap[][] soapModels = null;
80  
81          if (models.length > 0) {
82              soapModels = new MBCategorySoap[models.length][models[0].length];
83          }
84          else {
85              soapModels = new MBCategorySoap[0][0];
86          }
87  
88          for (int i = 0; i < models.length; i++) {
89              soapModels[i] = toSoapModels(models[i]);
90          }
91  
92          return soapModels;
93      }
94  
95      public static MBCategorySoap[] toSoapModels(List<MBCategory> models) {
96          List<MBCategorySoap> soapModels = new ArrayList<MBCategorySoap>(models.size());
97  
98          for (MBCategory model : models) {
99              soapModels.add(toSoapModel(model));
100         }
101 
102         return soapModels.toArray(new MBCategorySoap[soapModels.size()]);
103     }
104 
105     public MBCategorySoap() {
106     }
107 
108     public long getPrimaryKey() {
109         return _categoryId;
110     }
111 
112     public void setPrimaryKey(long pk) {
113         setCategoryId(pk);
114     }
115 
116     public String getUuid() {
117         return _uuid;
118     }
119 
120     public void setUuid(String uuid) {
121         _uuid = uuid;
122     }
123 
124     public long getCategoryId() {
125         return _categoryId;
126     }
127 
128     public void setCategoryId(long categoryId) {
129         _categoryId = categoryId;
130     }
131 
132     public long getGroupId() {
133         return _groupId;
134     }
135 
136     public void setGroupId(long groupId) {
137         _groupId = groupId;
138     }
139 
140     public long getCompanyId() {
141         return _companyId;
142     }
143 
144     public void setCompanyId(long companyId) {
145         _companyId = companyId;
146     }
147 
148     public long getUserId() {
149         return _userId;
150     }
151 
152     public void setUserId(long userId) {
153         _userId = userId;
154     }
155 
156     public String getUserName() {
157         return _userName;
158     }
159 
160     public void setUserName(String userName) {
161         _userName = userName;
162     }
163 
164     public Date getCreateDate() {
165         return _createDate;
166     }
167 
168     public void setCreateDate(Date createDate) {
169         _createDate = createDate;
170     }
171 
172     public Date getModifiedDate() {
173         return _modifiedDate;
174     }
175 
176     public void setModifiedDate(Date modifiedDate) {
177         _modifiedDate = modifiedDate;
178     }
179 
180     public long getParentCategoryId() {
181         return _parentCategoryId;
182     }
183 
184     public void setParentCategoryId(long parentCategoryId) {
185         _parentCategoryId = parentCategoryId;
186     }
187 
188     public String getName() {
189         return _name;
190     }
191 
192     public void setName(String name) {
193         _name = name;
194     }
195 
196     public String getDescription() {
197         return _description;
198     }
199 
200     public void setDescription(String description) {
201         _description = description;
202     }
203 
204     public int getThreadCount() {
205         return _threadCount;
206     }
207 
208     public void setThreadCount(int threadCount) {
209         _threadCount = threadCount;
210     }
211 
212     public int getMessageCount() {
213         return _messageCount;
214     }
215 
216     public void setMessageCount(int messageCount) {
217         _messageCount = messageCount;
218     }
219 
220     public Date getLastPostDate() {
221         return _lastPostDate;
222     }
223 
224     public void setLastPostDate(Date lastPostDate) {
225         _lastPostDate = lastPostDate;
226     }
227 
228     private String _uuid;
229     private long _categoryId;
230     private long _groupId;
231     private long _companyId;
232     private long _userId;
233     private String _userName;
234     private Date _createDate;
235     private Date _modifiedDate;
236     private long _parentCategoryId;
237     private String _name;
238     private String _description;
239     private int _threadCount;
240     private int _messageCount;
241     private Date _lastPostDate;
242 }