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.List;
027:
028: /**
029: * <a href="MBDiscussionSoap.java.html"><b><i>View Source</i></b></a>
030: *
031: * <p>
032: * ServiceBuilder generated this class. Modifications in this class will be
033: * overwritten the next time is generated.
034: * </p>
035: *
036: * <p>
037: * This class is used by
038: * <code>com.liferay.portlet.messageboards.service.http.MBDiscussionServiceSoap</code>.
039: * </p>
040: *
041: * @author Brian Wing Shun Chan
042: *
043: * @see com.liferay.portlet.messageboards.service.http.MBDiscussionServiceSoap
044: *
045: */
046: public class MBDiscussionSoap implements Serializable {
047: public static MBDiscussionSoap toSoapModel(MBDiscussion model) {
048: MBDiscussionSoap soapModel = new MBDiscussionSoap();
049:
050: soapModel.setDiscussionId(model.getDiscussionId());
051: soapModel.setClassNameId(model.getClassNameId());
052: soapModel.setClassPK(model.getClassPK());
053: soapModel.setThreadId(model.getThreadId());
054:
055: return soapModel;
056: }
057:
058: public static MBDiscussionSoap[] toSoapModels(List models) {
059: List soapModels = new ArrayList(models.size());
060:
061: for (int i = 0; i < models.size(); i++) {
062: MBDiscussion model = (MBDiscussion) models.get(i);
063:
064: soapModels.add(toSoapModel(model));
065: }
066:
067: return (MBDiscussionSoap[]) soapModels
068: .toArray(new MBDiscussionSoap[0]);
069: }
070:
071: public MBDiscussionSoap() {
072: }
073:
074: public long getPrimaryKey() {
075: return _discussionId;
076: }
077:
078: public void setPrimaryKey(long pk) {
079: setDiscussionId(pk);
080: }
081:
082: public long getDiscussionId() {
083: return _discussionId;
084: }
085:
086: public void setDiscussionId(long discussionId) {
087: _discussionId = discussionId;
088: }
089:
090: public long getClassNameId() {
091: return _classNameId;
092: }
093:
094: public void setClassNameId(long classNameId) {
095: _classNameId = classNameId;
096: }
097:
098: public long getClassPK() {
099: return _classPK;
100: }
101:
102: public void setClassPK(long classPK) {
103: _classPK = classPK;
104: }
105:
106: public long getThreadId() {
107: return _threadId;
108: }
109:
110: public void setThreadId(long threadId) {
111: _threadId = threadId;
112: }
113:
114: private long _discussionId;
115: private long _classNameId;
116: private long _classPK;
117: private long _threadId;
118: }
|