001: /**
002: * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
003: *
004: * Permission is hereby granted, free of charge, to any person obtaining a copy
005: * of this software and associated documentation files (the "Software"), to deal
006: * in the Software without restriction, including without limitation the rights
007: * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
008: * copies of the Software, and to permit persons to whom the Software is
009: * furnished to do so, subject to the following conditions:
010: *
011: * The above copyright notice and this permission notice shall be included in
012: * all copies or substantial portions of the Software.
013: *
014: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
015: * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
016: * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
017: * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
018: * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
019: * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
020: * SOFTWARE.
021: */package com.liferay.portlet.messageboards.model;
022:
023: import java.io.Serializable;
024:
025: import java.util.ArrayList;
026: import java.util.Date;
027: import java.util.List;
028:
029: /**
030: * <a href="MBThreadSoap.java.html"><b><i>View Source</i></b></a>
031: *
032: * <p>
033: * ServiceBuilder generated this class. Modifications in this class will be
034: * overwritten the next time is generated.
035: * </p>
036: *
037: * <p>
038: * This class is used by
039: * <code>com.liferay.portlet.messageboards.service.http.MBThreadServiceSoap</code>.
040: * </p>
041: *
042: * @author Brian Wing Shun Chan
043: *
044: * @see com.liferay.portlet.messageboards.service.http.MBThreadServiceSoap
045: *
046: */
047: public class MBThreadSoap implements Serializable {
048: public static MBThreadSoap toSoapModel(MBThread model) {
049: MBThreadSoap soapModel = new MBThreadSoap();
050:
051: soapModel.setThreadId(model.getThreadId());
052: soapModel.setCategoryId(model.getCategoryId());
053: soapModel.setRootMessageId(model.getRootMessageId());
054: soapModel.setMessageCount(model.getMessageCount());
055: soapModel.setViewCount(model.getViewCount());
056: soapModel.setLastPostByUserId(model.getLastPostByUserId());
057: soapModel.setLastPostDate(model.getLastPostDate());
058: soapModel.setPriority(model.getPriority());
059:
060: return soapModel;
061: }
062:
063: public static MBThreadSoap[] toSoapModels(List models) {
064: List soapModels = new ArrayList(models.size());
065:
066: for (int i = 0; i < models.size(); i++) {
067: MBThread model = (MBThread) models.get(i);
068:
069: soapModels.add(toSoapModel(model));
070: }
071:
072: return (MBThreadSoap[]) soapModels.toArray(new MBThreadSoap[0]);
073: }
074:
075: public MBThreadSoap() {
076: }
077:
078: public long getPrimaryKey() {
079: return _threadId;
080: }
081:
082: public void setPrimaryKey(long pk) {
083: setThreadId(pk);
084: }
085:
086: public long getThreadId() {
087: return _threadId;
088: }
089:
090: public void setThreadId(long threadId) {
091: _threadId = threadId;
092: }
093:
094: public long getCategoryId() {
095: return _categoryId;
096: }
097:
098: public void setCategoryId(long categoryId) {
099: _categoryId = categoryId;
100: }
101:
102: public long getRootMessageId() {
103: return _rootMessageId;
104: }
105:
106: public void setRootMessageId(long rootMessageId) {
107: _rootMessageId = rootMessageId;
108: }
109:
110: public int getMessageCount() {
111: return _messageCount;
112: }
113:
114: public void setMessageCount(int messageCount) {
115: _messageCount = messageCount;
116: }
117:
118: public int getViewCount() {
119: return _viewCount;
120: }
121:
122: public void setViewCount(int viewCount) {
123: _viewCount = viewCount;
124: }
125:
126: public long getLastPostByUserId() {
127: return _lastPostByUserId;
128: }
129:
130: public void setLastPostByUserId(long lastPostByUserId) {
131: _lastPostByUserId = lastPostByUserId;
132: }
133:
134: public Date getLastPostDate() {
135: return _lastPostDate;
136: }
137:
138: public void setLastPostDate(Date lastPostDate) {
139: _lastPostDate = lastPostDate;
140: }
141:
142: public double getPriority() {
143: return _priority;
144: }
145:
146: public void setPriority(double priority) {
147: _priority = priority;
148: }
149:
150: private long _threadId;
151: private long _categoryId;
152: private long _rootMessageId;
153: private int _messageCount;
154: private int _viewCount;
155: private long _lastPostByUserId;
156: private Date _lastPostDate;
157: private double _priority;
158: }
|