001
014
015 package com.liferay.portlet.messageboards.model;
016
017 import java.io.Serializable;
018
019 import java.util.ArrayList;
020 import java.util.Date;
021 import java.util.List;
022
023
030 public class MBThreadSoap implements Serializable {
031 public static MBThreadSoap toSoapModel(MBThread model) {
032 MBThreadSoap soapModel = new MBThreadSoap();
033
034 soapModel.setThreadId(model.getThreadId());
035 soapModel.setGroupId(model.getGroupId());
036 soapModel.setCompanyId(model.getCompanyId());
037 soapModel.setCategoryId(model.getCategoryId());
038 soapModel.setRootMessageId(model.getRootMessageId());
039 soapModel.setRootMessageUserId(model.getRootMessageUserId());
040 soapModel.setMessageCount(model.getMessageCount());
041 soapModel.setViewCount(model.getViewCount());
042 soapModel.setLastPostByUserId(model.getLastPostByUserId());
043 soapModel.setLastPostDate(model.getLastPostDate());
044 soapModel.setPriority(model.getPriority());
045 soapModel.setQuestion(model.getQuestion());
046 soapModel.setStatus(model.getStatus());
047 soapModel.setStatusByUserId(model.getStatusByUserId());
048 soapModel.setStatusByUserName(model.getStatusByUserName());
049 soapModel.setStatusDate(model.getStatusDate());
050
051 return soapModel;
052 }
053
054 public static MBThreadSoap[] toSoapModels(MBThread[] models) {
055 MBThreadSoap[] soapModels = new MBThreadSoap[models.length];
056
057 for (int i = 0; i < models.length; i++) {
058 soapModels[i] = toSoapModel(models[i]);
059 }
060
061 return soapModels;
062 }
063
064 public static MBThreadSoap[][] toSoapModels(MBThread[][] models) {
065 MBThreadSoap[][] soapModels = null;
066
067 if (models.length > 0) {
068 soapModels = new MBThreadSoap[models.length][models[0].length];
069 }
070 else {
071 soapModels = new MBThreadSoap[0][0];
072 }
073
074 for (int i = 0; i < models.length; i++) {
075 soapModels[i] = toSoapModels(models[i]);
076 }
077
078 return soapModels;
079 }
080
081 public static MBThreadSoap[] toSoapModels(List<MBThread> models) {
082 List<MBThreadSoap> soapModels = new ArrayList<MBThreadSoap>(models.size());
083
084 for (MBThread model : models) {
085 soapModels.add(toSoapModel(model));
086 }
087
088 return soapModels.toArray(new MBThreadSoap[soapModels.size()]);
089 }
090
091 public MBThreadSoap() {
092 }
093
094 public long getPrimaryKey() {
095 return _threadId;
096 }
097
098 public void setPrimaryKey(long pk) {
099 setThreadId(pk);
100 }
101
102 public long getThreadId() {
103 return _threadId;
104 }
105
106 public void setThreadId(long threadId) {
107 _threadId = threadId;
108 }
109
110 public long getGroupId() {
111 return _groupId;
112 }
113
114 public void setGroupId(long groupId) {
115 _groupId = groupId;
116 }
117
118 public long getCompanyId() {
119 return _companyId;
120 }
121
122 public void setCompanyId(long companyId) {
123 _companyId = companyId;
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 getRootMessageId() {
135 return _rootMessageId;
136 }
137
138 public void setRootMessageId(long rootMessageId) {
139 _rootMessageId = rootMessageId;
140 }
141
142 public long getRootMessageUserId() {
143 return _rootMessageUserId;
144 }
145
146 public void setRootMessageUserId(long rootMessageUserId) {
147 _rootMessageUserId = rootMessageUserId;
148 }
149
150 public int getMessageCount() {
151 return _messageCount;
152 }
153
154 public void setMessageCount(int messageCount) {
155 _messageCount = messageCount;
156 }
157
158 public int getViewCount() {
159 return _viewCount;
160 }
161
162 public void setViewCount(int viewCount) {
163 _viewCount = viewCount;
164 }
165
166 public long getLastPostByUserId() {
167 return _lastPostByUserId;
168 }
169
170 public void setLastPostByUserId(long lastPostByUserId) {
171 _lastPostByUserId = lastPostByUserId;
172 }
173
174 public Date getLastPostDate() {
175 return _lastPostDate;
176 }
177
178 public void setLastPostDate(Date lastPostDate) {
179 _lastPostDate = lastPostDate;
180 }
181
182 public double getPriority() {
183 return _priority;
184 }
185
186 public void setPriority(double priority) {
187 _priority = priority;
188 }
189
190 public boolean getQuestion() {
191 return _question;
192 }
193
194 public boolean isQuestion() {
195 return _question;
196 }
197
198 public void setQuestion(boolean question) {
199 _question = question;
200 }
201
202 public int getStatus() {
203 return _status;
204 }
205
206 public void setStatus(int status) {
207 _status = status;
208 }
209
210 public long getStatusByUserId() {
211 return _statusByUserId;
212 }
213
214 public void setStatusByUserId(long statusByUserId) {
215 _statusByUserId = statusByUserId;
216 }
217
218 public String getStatusByUserName() {
219 return _statusByUserName;
220 }
221
222 public void setStatusByUserName(String statusByUserName) {
223 _statusByUserName = statusByUserName;
224 }
225
226 public Date getStatusDate() {
227 return _statusDate;
228 }
229
230 public void setStatusDate(Date statusDate) {
231 _statusDate = statusDate;
232 }
233
234 private long _threadId;
235 private long _groupId;
236 private long _companyId;
237 private long _categoryId;
238 private long _rootMessageId;
239 private long _rootMessageUserId;
240 private int _messageCount;
241 private int _viewCount;
242 private long _lastPostByUserId;
243 private Date _lastPostDate;
244 private double _priority;
245 private boolean _question;
246 private int _status;
247 private long _statusByUserId;
248 private String _statusByUserName;
249 private Date _statusDate;
250 }