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="MBMessageSoap.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.MBMessageServiceSoap</code>.
040: * </p>
041: *
042: * @author Brian Wing Shun Chan
043: *
044: * @see com.liferay.portlet.messageboards.service.http.MBMessageServiceSoap
045: *
046: */
047: public class MBMessageSoap implements Serializable {
048: public static MBMessageSoap toSoapModel(MBMessage model) {
049: MBMessageSoap soapModel = new MBMessageSoap();
050:
051: soapModel.setUuid(model.getUuid());
052: soapModel.setMessageId(model.getMessageId());
053: soapModel.setCompanyId(model.getCompanyId());
054: soapModel.setUserId(model.getUserId());
055: soapModel.setUserName(model.getUserName());
056: soapModel.setCreateDate(model.getCreateDate());
057: soapModel.setModifiedDate(model.getModifiedDate());
058: soapModel.setCategoryId(model.getCategoryId());
059: soapModel.setThreadId(model.getThreadId());
060: soapModel.setParentMessageId(model.getParentMessageId());
061: soapModel.setSubject(model.getSubject());
062: soapModel.setBody(model.getBody());
063: soapModel.setAttachments(model.getAttachments());
064: soapModel.setAnonymous(model.getAnonymous());
065:
066: return soapModel;
067: }
068:
069: public static MBMessageSoap[] toSoapModels(List models) {
070: List soapModels = new ArrayList(models.size());
071:
072: for (int i = 0; i < models.size(); i++) {
073: MBMessage model = (MBMessage) models.get(i);
074:
075: soapModels.add(toSoapModel(model));
076: }
077:
078: return (MBMessageSoap[]) soapModels
079: .toArray(new MBMessageSoap[0]);
080: }
081:
082: public MBMessageSoap() {
083: }
084:
085: public long getPrimaryKey() {
086: return _messageId;
087: }
088:
089: public void setPrimaryKey(long pk) {
090: setMessageId(pk);
091: }
092:
093: public String getUuid() {
094: return _uuid;
095: }
096:
097: public void setUuid(String uuid) {
098: _uuid = uuid;
099: }
100:
101: public long getMessageId() {
102: return _messageId;
103: }
104:
105: public void setMessageId(long messageId) {
106: _messageId = messageId;
107: }
108:
109: public long getCompanyId() {
110: return _companyId;
111: }
112:
113: public void setCompanyId(long companyId) {
114: _companyId = companyId;
115: }
116:
117: public long getUserId() {
118: return _userId;
119: }
120:
121: public void setUserId(long userId) {
122: _userId = userId;
123: }
124:
125: public String getUserName() {
126: return _userName;
127: }
128:
129: public void setUserName(String userName) {
130: _userName = userName;
131: }
132:
133: public Date getCreateDate() {
134: return _createDate;
135: }
136:
137: public void setCreateDate(Date createDate) {
138: _createDate = createDate;
139: }
140:
141: public Date getModifiedDate() {
142: return _modifiedDate;
143: }
144:
145: public void setModifiedDate(Date modifiedDate) {
146: _modifiedDate = modifiedDate;
147: }
148:
149: public long getCategoryId() {
150: return _categoryId;
151: }
152:
153: public void setCategoryId(long categoryId) {
154: _categoryId = categoryId;
155: }
156:
157: public long getThreadId() {
158: return _threadId;
159: }
160:
161: public void setThreadId(long threadId) {
162: _threadId = threadId;
163: }
164:
165: public long getParentMessageId() {
166: return _parentMessageId;
167: }
168:
169: public void setParentMessageId(long parentMessageId) {
170: _parentMessageId = parentMessageId;
171: }
172:
173: public String getSubject() {
174: return _subject;
175: }
176:
177: public void setSubject(String subject) {
178: _subject = subject;
179: }
180:
181: public String getBody() {
182: return _body;
183: }
184:
185: public void setBody(String body) {
186: _body = body;
187: }
188:
189: public boolean getAttachments() {
190: return _attachments;
191: }
192:
193: public boolean isAttachments() {
194: return _attachments;
195: }
196:
197: public void setAttachments(boolean attachments) {
198: _attachments = attachments;
199: }
200:
201: public boolean getAnonymous() {
202: return _anonymous;
203: }
204:
205: public boolean isAnonymous() {
206: return _anonymous;
207: }
208:
209: public void setAnonymous(boolean anonymous) {
210: _anonymous = anonymous;
211: }
212:
213: private String _uuid;
214: private long _messageId;
215: private long _companyId;
216: private long _userId;
217: private String _userName;
218: private Date _createDate;
219: private Date _modifiedDate;
220: private long _categoryId;
221: private long _threadId;
222: private long _parentMessageId;
223: private String _subject;
224: private String _body;
225: private boolean _attachments;
226: private boolean _anonymous;
227: }
|