1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.messageboards.model;
24  
25  import java.io.Serializable;
26  
27  import java.util.ArrayList;
28  import java.util.Date;
29  import java.util.List;
30  
31  /**
32   * <a href="MBMessageFlagSoap.java.html"><b><i>View Source</i></b></a>
33   *
34   * <p>
35   * ServiceBuilder generated this class. Modifications in this class will be
36   * overwritten the next time is generated.
37   * </p>
38   *
39   * <p>
40   * This class is used by
41   * {@link com.liferay.portlet.messageboards.service.http.MBMessageFlagServiceSoap}.
42   * </p>
43   *
44   * @author    Brian Wing Shun Chan
45   * @see       com.liferay.portlet.messageboards.service.http.MBMessageFlagServiceSoap
46   * @generated
47   */
48  public class MBMessageFlagSoap implements Serializable {
49      public static MBMessageFlagSoap toSoapModel(MBMessageFlag model) {
50          MBMessageFlagSoap soapModel = new MBMessageFlagSoap();
51  
52          soapModel.setMessageFlagId(model.getMessageFlagId());
53          soapModel.setUserId(model.getUserId());
54          soapModel.setModifiedDate(model.getModifiedDate());
55          soapModel.setThreadId(model.getThreadId());
56          soapModel.setMessageId(model.getMessageId());
57          soapModel.setFlag(model.getFlag());
58  
59          return soapModel;
60      }
61  
62      public static MBMessageFlagSoap[] toSoapModels(MBMessageFlag[] models) {
63          MBMessageFlagSoap[] soapModels = new MBMessageFlagSoap[models.length];
64  
65          for (int i = 0; i < models.length; i++) {
66              soapModels[i] = toSoapModel(models[i]);
67          }
68  
69          return soapModels;
70      }
71  
72      public static MBMessageFlagSoap[][] toSoapModels(MBMessageFlag[][] models) {
73          MBMessageFlagSoap[][] soapModels = null;
74  
75          if (models.length > 0) {
76              soapModels = new MBMessageFlagSoap[models.length][models[0].length];
77          }
78          else {
79              soapModels = new MBMessageFlagSoap[0][0];
80          }
81  
82          for (int i = 0; i < models.length; i++) {
83              soapModels[i] = toSoapModels(models[i]);
84          }
85  
86          return soapModels;
87      }
88  
89      public static MBMessageFlagSoap[] toSoapModels(List<MBMessageFlag> models) {
90          List<MBMessageFlagSoap> soapModels = new ArrayList<MBMessageFlagSoap>(models.size());
91  
92          for (MBMessageFlag model : models) {
93              soapModels.add(toSoapModel(model));
94          }
95  
96          return soapModels.toArray(new MBMessageFlagSoap[soapModels.size()]);
97      }
98  
99      public MBMessageFlagSoap() {
100     }
101 
102     public long getPrimaryKey() {
103         return _messageFlagId;
104     }
105 
106     public void setPrimaryKey(long pk) {
107         setMessageFlagId(pk);
108     }
109 
110     public long getMessageFlagId() {
111         return _messageFlagId;
112     }
113 
114     public void setMessageFlagId(long messageFlagId) {
115         _messageFlagId = messageFlagId;
116     }
117 
118     public long getUserId() {
119         return _userId;
120     }
121 
122     public void setUserId(long userId) {
123         _userId = userId;
124     }
125 
126     public Date getModifiedDate() {
127         return _modifiedDate;
128     }
129 
130     public void setModifiedDate(Date modifiedDate) {
131         _modifiedDate = modifiedDate;
132     }
133 
134     public long getThreadId() {
135         return _threadId;
136     }
137 
138     public void setThreadId(long threadId) {
139         _threadId = threadId;
140     }
141 
142     public long getMessageId() {
143         return _messageId;
144     }
145 
146     public void setMessageId(long messageId) {
147         _messageId = messageId;
148     }
149 
150     public int getFlag() {
151         return _flag;
152     }
153 
154     public void setFlag(int flag) {
155         _flag = flag;
156     }
157 
158     private long _messageFlagId;
159     private long _userId;
160     private Date _modifiedDate;
161     private long _threadId;
162     private long _messageId;
163     private int _flag;
164 }