1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portlet.messageboards.model;
16  
17  import java.io.Serializable;
18  
19  import java.util.ArrayList;
20  import java.util.Date;
21  import java.util.List;
22  
23  /**
24   * <a href="MBThreadSoap.java.html"><b><i>View Source</i></b></a>
25   *
26   * <p>
27   * ServiceBuilder generated this class. Modifications in this class will be
28   * overwritten the next time is generated.
29   * </p>
30   *
31   * <p>
32   * This class is used by
33   * {@link com.liferay.portlet.messageboards.service.http.MBThreadServiceSoap}.
34   * </p>
35   *
36   * @author    Brian Wing Shun Chan
37   * @see       com.liferay.portlet.messageboards.service.http.MBThreadServiceSoap
38   * @generated
39   */
40  public class MBThreadSoap implements Serializable {
41      public static MBThreadSoap toSoapModel(MBThread model) {
42          MBThreadSoap soapModel = new MBThreadSoap();
43  
44          soapModel.setThreadId(model.getThreadId());
45          soapModel.setGroupId(model.getGroupId());
46          soapModel.setCategoryId(model.getCategoryId());
47          soapModel.setRootMessageId(model.getRootMessageId());
48          soapModel.setMessageCount(model.getMessageCount());
49          soapModel.setViewCount(model.getViewCount());
50          soapModel.setLastPostByUserId(model.getLastPostByUserId());
51          soapModel.setLastPostDate(model.getLastPostDate());
52          soapModel.setPriority(model.getPriority());
53          soapModel.setStatus(model.getStatus());
54          soapModel.setStatusByUserId(model.getStatusByUserId());
55          soapModel.setStatusByUserName(model.getStatusByUserName());
56          soapModel.setStatusDate(model.getStatusDate());
57  
58          return soapModel;
59      }
60  
61      public static MBThreadSoap[] toSoapModels(MBThread[] models) {
62          MBThreadSoap[] soapModels = new MBThreadSoap[models.length];
63  
64          for (int i = 0; i < models.length; i++) {
65              soapModels[i] = toSoapModel(models[i]);
66          }
67  
68          return soapModels;
69      }
70  
71      public static MBThreadSoap[][] toSoapModels(MBThread[][] models) {
72          MBThreadSoap[][] soapModels = null;
73  
74          if (models.length > 0) {
75              soapModels = new MBThreadSoap[models.length][models[0].length];
76          }
77          else {
78              soapModels = new MBThreadSoap[0][0];
79          }
80  
81          for (int i = 0; i < models.length; i++) {
82              soapModels[i] = toSoapModels(models[i]);
83          }
84  
85          return soapModels;
86      }
87  
88      public static MBThreadSoap[] toSoapModels(List<MBThread> models) {
89          List<MBThreadSoap> soapModels = new ArrayList<MBThreadSoap>(models.size());
90  
91          for (MBThread model : models) {
92              soapModels.add(toSoapModel(model));
93          }
94  
95          return soapModels.toArray(new MBThreadSoap[soapModels.size()]);
96      }
97  
98      public MBThreadSoap() {
99      }
100 
101     public long getPrimaryKey() {
102         return _threadId;
103     }
104 
105     public void setPrimaryKey(long pk) {
106         setThreadId(pk);
107     }
108 
109     public long getThreadId() {
110         return _threadId;
111     }
112 
113     public void setThreadId(long threadId) {
114         _threadId = threadId;
115     }
116 
117     public long getGroupId() {
118         return _groupId;
119     }
120 
121     public void setGroupId(long groupId) {
122         _groupId = groupId;
123     }
124 
125     public long getCategoryId() {
126         return _categoryId;
127     }
128 
129     public void setCategoryId(long categoryId) {
130         _categoryId = categoryId;
131     }
132 
133     public long getRootMessageId() {
134         return _rootMessageId;
135     }
136 
137     public void setRootMessageId(long rootMessageId) {
138         _rootMessageId = rootMessageId;
139     }
140 
141     public int getMessageCount() {
142         return _messageCount;
143     }
144 
145     public void setMessageCount(int messageCount) {
146         _messageCount = messageCount;
147     }
148 
149     public int getViewCount() {
150         return _viewCount;
151     }
152 
153     public void setViewCount(int viewCount) {
154         _viewCount = viewCount;
155     }
156 
157     public long getLastPostByUserId() {
158         return _lastPostByUserId;
159     }
160 
161     public void setLastPostByUserId(long lastPostByUserId) {
162         _lastPostByUserId = lastPostByUserId;
163     }
164 
165     public Date getLastPostDate() {
166         return _lastPostDate;
167     }
168 
169     public void setLastPostDate(Date lastPostDate) {
170         _lastPostDate = lastPostDate;
171     }
172 
173     public double getPriority() {
174         return _priority;
175     }
176 
177     public void setPriority(double priority) {
178         _priority = priority;
179     }
180 
181     public int getStatus() {
182         return _status;
183     }
184 
185     public void setStatus(int status) {
186         _status = status;
187     }
188 
189     public long getStatusByUserId() {
190         return _statusByUserId;
191     }
192 
193     public void setStatusByUserId(long statusByUserId) {
194         _statusByUserId = statusByUserId;
195     }
196 
197     public String getStatusByUserName() {
198         return _statusByUserName;
199     }
200 
201     public void setStatusByUserName(String statusByUserName) {
202         _statusByUserName = statusByUserName;
203     }
204 
205     public Date getStatusDate() {
206         return _statusDate;
207     }
208 
209     public void setStatusDate(Date statusDate) {
210         _statusDate = statusDate;
211     }
212 
213     private long _threadId;
214     private long _groupId;
215     private long _categoryId;
216     private long _rootMessageId;
217     private int _messageCount;
218     private int _viewCount;
219     private long _lastPostByUserId;
220     private Date _lastPostDate;
221     private double _priority;
222     private int _status;
223     private long _statusByUserId;
224     private String _statusByUserName;
225     private Date _statusDate;
226 }