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