1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portlet.messageboards.model;
16  
17  import java.io.Serializable;
18  
19  import java.util.ArrayList;
20  import java.util.List;
21  
22  /**
23   * <a href="MBDiscussionSoap.java.html"><b><i>View Source</i></b></a>
24   *
25   * <p>
26   * ServiceBuilder generated this class. Modifications in this class will be
27   * overwritten the next time is generated.
28   * </p>
29   *
30   * <p>
31   * This class is used by
32   * {@link com.liferay.portlet.messageboards.service.http.MBDiscussionServiceSoap}.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       com.liferay.portlet.messageboards.service.http.MBDiscussionServiceSoap
37   * @generated
38   */
39  public class MBDiscussionSoap implements Serializable {
40      public static MBDiscussionSoap toSoapModel(MBDiscussion model) {
41          MBDiscussionSoap soapModel = new MBDiscussionSoap();
42  
43          soapModel.setDiscussionId(model.getDiscussionId());
44          soapModel.setClassNameId(model.getClassNameId());
45          soapModel.setClassPK(model.getClassPK());
46          soapModel.setThreadId(model.getThreadId());
47  
48          return soapModel;
49      }
50  
51      public static MBDiscussionSoap[] toSoapModels(MBDiscussion[] models) {
52          MBDiscussionSoap[] soapModels = new MBDiscussionSoap[models.length];
53  
54          for (int i = 0; i < models.length; i++) {
55              soapModels[i] = toSoapModel(models[i]);
56          }
57  
58          return soapModels;
59      }
60  
61      public static MBDiscussionSoap[][] toSoapModels(MBDiscussion[][] models) {
62          MBDiscussionSoap[][] soapModels = null;
63  
64          if (models.length > 0) {
65              soapModels = new MBDiscussionSoap[models.length][models[0].length];
66          }
67          else {
68              soapModels = new MBDiscussionSoap[0][0];
69          }
70  
71          for (int i = 0; i < models.length; i++) {
72              soapModels[i] = toSoapModels(models[i]);
73          }
74  
75          return soapModels;
76      }
77  
78      public static MBDiscussionSoap[] toSoapModels(List<MBDiscussion> models) {
79          List<MBDiscussionSoap> soapModels = new ArrayList<MBDiscussionSoap>(models.size());
80  
81          for (MBDiscussion model : models) {
82              soapModels.add(toSoapModel(model));
83          }
84  
85          return soapModels.toArray(new MBDiscussionSoap[soapModels.size()]);
86      }
87  
88      public MBDiscussionSoap() {
89      }
90  
91      public long getPrimaryKey() {
92          return _discussionId;
93      }
94  
95      public void setPrimaryKey(long pk) {
96          setDiscussionId(pk);
97      }
98  
99      public long getDiscussionId() {
100         return _discussionId;
101     }
102 
103     public void setDiscussionId(long discussionId) {
104         _discussionId = discussionId;
105     }
106 
107     public long getClassNameId() {
108         return _classNameId;
109     }
110 
111     public void setClassNameId(long classNameId) {
112         _classNameId = classNameId;
113     }
114 
115     public long getClassPK() {
116         return _classPK;
117     }
118 
119     public void setClassPK(long classPK) {
120         _classPK = classPK;
121     }
122 
123     public long getThreadId() {
124         return _threadId;
125     }
126 
127     public void setThreadId(long threadId) {
128         _threadId = threadId;
129     }
130 
131     private long _discussionId;
132     private long _classNameId;
133     private long _classPK;
134     private long _threadId;
135 }