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="MBThreadSoap.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.MBThreadServiceSoap</code>.
39   * </p>
40   *
41   * @author Brian Wing Shun Chan
42   *
43   * @see com.liferay.portlet.messageboards.service.http.MBThreadServiceSoap
44   *
45   */
46  public class MBThreadSoap implements Serializable {
47      public static MBThreadSoap toSoapModel(MBThread model) {
48          MBThreadSoap soapModel = new MBThreadSoap();
49  
50          soapModel.setThreadId(model.getThreadId());
51          soapModel.setGroupId(model.getGroupId());
52          soapModel.setCategoryId(model.getCategoryId());
53          soapModel.setRootMessageId(model.getRootMessageId());
54          soapModel.setMessageCount(model.getMessageCount());
55          soapModel.setViewCount(model.getViewCount());
56          soapModel.setLastPostByUserId(model.getLastPostByUserId());
57          soapModel.setLastPostDate(model.getLastPostDate());
58          soapModel.setPriority(model.getPriority());
59  
60          return soapModel;
61      }
62  
63      public static MBThreadSoap[] toSoapModels(List<MBThread> models) {
64          List<MBThreadSoap> soapModels = new ArrayList<MBThreadSoap>(models.size());
65  
66          for (MBThread model : models) {
67              soapModels.add(toSoapModel(model));
68          }
69  
70          return soapModels.toArray(new MBThreadSoap[soapModels.size()]);
71      }
72  
73      public MBThreadSoap() {
74      }
75  
76      public long getPrimaryKey() {
77          return _threadId;
78      }
79  
80      public void setPrimaryKey(long pk) {
81          setThreadId(pk);
82      }
83  
84      public long getThreadId() {
85          return _threadId;
86      }
87  
88      public void setThreadId(long threadId) {
89          _threadId = threadId;
90      }
91  
92      public long getGroupId() {
93          return _groupId;
94      }
95  
96      public void setGroupId(long groupId) {
97          _groupId = groupId;
98      }
99  
100     public long getCategoryId() {
101         return _categoryId;
102     }
103 
104     public void setCategoryId(long categoryId) {
105         _categoryId = categoryId;
106     }
107 
108     public long getRootMessageId() {
109         return _rootMessageId;
110     }
111 
112     public void setRootMessageId(long rootMessageId) {
113         _rootMessageId = rootMessageId;
114     }
115 
116     public int getMessageCount() {
117         return _messageCount;
118     }
119 
120     public void setMessageCount(int messageCount) {
121         _messageCount = messageCount;
122     }
123 
124     public int getViewCount() {
125         return _viewCount;
126     }
127 
128     public void setViewCount(int viewCount) {
129         _viewCount = viewCount;
130     }
131 
132     public long getLastPostByUserId() {
133         return _lastPostByUserId;
134     }
135 
136     public void setLastPostByUserId(long lastPostByUserId) {
137         _lastPostByUserId = lastPostByUserId;
138     }
139 
140     public Date getLastPostDate() {
141         return _lastPostDate;
142     }
143 
144     public void setLastPostDate(Date lastPostDate) {
145         _lastPostDate = lastPostDate;
146     }
147 
148     public double getPriority() {
149         return _priority;
150     }
151 
152     public void setPriority(double priority) {
153         _priority = priority;
154     }
155 
156     private long _threadId;
157     private long _groupId;
158     private long _categoryId;
159     private long _rootMessageId;
160     private int _messageCount;
161     private int _viewCount;
162     private long _lastPostByUserId;
163     private Date _lastPostDate;
164     private double _priority;
165 }