1   /**
2    * Copyright (c) 2000-2010 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   *
12   *
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  
54          return soapModel;
55      }
56  
57      public static MBThreadSoap[] toSoapModels(MBThread[] models) {
58          MBThreadSoap[] soapModels = new MBThreadSoap[models.length];
59  
60          for (int i = 0; i < models.length; i++) {
61              soapModels[i] = toSoapModel(models[i]);
62          }
63  
64          return soapModels;
65      }
66  
67      public static MBThreadSoap[][] toSoapModels(MBThread[][] models) {
68          MBThreadSoap[][] soapModels = null;
69  
70          if (models.length > 0) {
71              soapModels = new MBThreadSoap[models.length][models[0].length];
72          }
73          else {
74              soapModels = new MBThreadSoap[0][0];
75          }
76  
77          for (int i = 0; i < models.length; i++) {
78              soapModels[i] = toSoapModels(models[i]);
79          }
80  
81          return soapModels;
82      }
83  
84      public static MBThreadSoap[] toSoapModels(List<MBThread> models) {
85          List<MBThreadSoap> soapModels = new ArrayList<MBThreadSoap>(models.size());
86  
87          for (MBThread model : models) {
88              soapModels.add(toSoapModel(model));
89          }
90  
91          return soapModels.toArray(new MBThreadSoap[soapModels.size()]);
92      }
93  
94      public MBThreadSoap() {
95      }
96  
97      public long getPrimaryKey() {
98          return _threadId;
99      }
100 
101     public void setPrimaryKey(long pk) {
102         setThreadId(pk);
103     }
104 
105     public long getThreadId() {
106         return _threadId;
107     }
108 
109     public void setThreadId(long threadId) {
110         _threadId = threadId;
111     }
112 
113     public long getGroupId() {
114         return _groupId;
115     }
116 
117     public void setGroupId(long groupId) {
118         _groupId = groupId;
119     }
120 
121     public long getCategoryId() {
122         return _categoryId;
123     }
124 
125     public void setCategoryId(long categoryId) {
126         _categoryId = categoryId;
127     }
128 
129     public long getRootMessageId() {
130         return _rootMessageId;
131     }
132 
133     public void setRootMessageId(long rootMessageId) {
134         _rootMessageId = rootMessageId;
135     }
136 
137     public int getMessageCount() {
138         return _messageCount;
139     }
140 
141     public void setMessageCount(int messageCount) {
142         _messageCount = messageCount;
143     }
144 
145     public int getViewCount() {
146         return _viewCount;
147     }
148 
149     public void setViewCount(int viewCount) {
150         _viewCount = viewCount;
151     }
152 
153     public long getLastPostByUserId() {
154         return _lastPostByUserId;
155     }
156 
157     public void setLastPostByUserId(long lastPostByUserId) {
158         _lastPostByUserId = lastPostByUserId;
159     }
160 
161     public Date getLastPostDate() {
162         return _lastPostDate;
163     }
164 
165     public void setLastPostDate(Date lastPostDate) {
166         _lastPostDate = lastPostDate;
167     }
168 
169     public double getPriority() {
170         return _priority;
171     }
172 
173     public void setPriority(double priority) {
174         _priority = priority;
175     }
176 
177     private long _threadId;
178     private long _groupId;
179     private long _categoryId;
180     private long _rootMessageId;
181     private int _messageCount;
182     private int _viewCount;
183     private long _lastPostByUserId;
184     private Date _lastPostDate;
185     private double _priority;
186 }