001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
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    /**
024     * <p>
025     * This class is used by
026     * {@link com.liferay.portlet.messageboards.service.http.MBThreadServiceSoap}.
027     * </p>
028     *
029     * @author    Brian Wing Shun Chan
030     * @see       com.liferay.portlet.messageboards.service.http.MBThreadServiceSoap
031     * @generated
032     */
033    public class MBThreadSoap implements Serializable {
034            public static MBThreadSoap toSoapModel(MBThread model) {
035                    MBThreadSoap soapModel = new MBThreadSoap();
036    
037                    soapModel.setThreadId(model.getThreadId());
038                    soapModel.setGroupId(model.getGroupId());
039                    soapModel.setCategoryId(model.getCategoryId());
040                    soapModel.setRootMessageId(model.getRootMessageId());
041                    soapModel.setMessageCount(model.getMessageCount());
042                    soapModel.setViewCount(model.getViewCount());
043                    soapModel.setLastPostByUserId(model.getLastPostByUserId());
044                    soapModel.setLastPostDate(model.getLastPostDate());
045                    soapModel.setPriority(model.getPriority());
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 getCategoryId() {
119                    return _categoryId;
120            }
121    
122            public void setCategoryId(long categoryId) {
123                    _categoryId = categoryId;
124            }
125    
126            public long getRootMessageId() {
127                    return _rootMessageId;
128            }
129    
130            public void setRootMessageId(long rootMessageId) {
131                    _rootMessageId = rootMessageId;
132            }
133    
134            public int getMessageCount() {
135                    return _messageCount;
136            }
137    
138            public void setMessageCount(int messageCount) {
139                    _messageCount = messageCount;
140            }
141    
142            public int getViewCount() {
143                    return _viewCount;
144            }
145    
146            public void setViewCount(int viewCount) {
147                    _viewCount = viewCount;
148            }
149    
150            public long getLastPostByUserId() {
151                    return _lastPostByUserId;
152            }
153    
154            public void setLastPostByUserId(long lastPostByUserId) {
155                    _lastPostByUserId = lastPostByUserId;
156            }
157    
158            public Date getLastPostDate() {
159                    return _lastPostDate;
160            }
161    
162            public void setLastPostDate(Date lastPostDate) {
163                    _lastPostDate = lastPostDate;
164            }
165    
166            public double getPriority() {
167                    return _priority;
168            }
169    
170            public void setPriority(double priority) {
171                    _priority = priority;
172            }
173    
174            public int getStatus() {
175                    return _status;
176            }
177    
178            public void setStatus(int status) {
179                    _status = status;
180            }
181    
182            public long getStatusByUserId() {
183                    return _statusByUserId;
184            }
185    
186            public void setStatusByUserId(long statusByUserId) {
187                    _statusByUserId = statusByUserId;
188            }
189    
190            public String getStatusByUserName() {
191                    return _statusByUserName;
192            }
193    
194            public void setStatusByUserName(String statusByUserName) {
195                    _statusByUserName = statusByUserName;
196            }
197    
198            public Date getStatusDate() {
199                    return _statusDate;
200            }
201    
202            public void setStatusDate(Date statusDate) {
203                    _statusDate = statusDate;
204            }
205    
206            private long _threadId;
207            private long _groupId;
208            private long _categoryId;
209            private long _rootMessageId;
210            private int _messageCount;
211            private int _viewCount;
212            private long _lastPostByUserId;
213            private Date _lastPostDate;
214            private double _priority;
215            private int _status;
216            private long _statusByUserId;
217            private String _statusByUserName;
218            private Date _statusDate;
219    }