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