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="MBStatsUserSoap.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.MBStatsUserServiceSoap}.
42   * </p>
43   *
44   * @author    Brian Wing Shun Chan
45   * @see       com.liferay.portlet.messageboards.service.http.MBStatsUserServiceSoap
46   * @generated
47   */
48  public class MBStatsUserSoap implements Serializable {
49      public static MBStatsUserSoap toSoapModel(MBStatsUser model) {
50          MBStatsUserSoap soapModel = new MBStatsUserSoap();
51  
52          soapModel.setStatsUserId(model.getStatsUserId());
53          soapModel.setGroupId(model.getGroupId());
54          soapModel.setUserId(model.getUserId());
55          soapModel.setMessageCount(model.getMessageCount());
56          soapModel.setLastPostDate(model.getLastPostDate());
57  
58          return soapModel;
59      }
60  
61      public static MBStatsUserSoap[] toSoapModels(MBStatsUser[] models) {
62          MBStatsUserSoap[] soapModels = new MBStatsUserSoap[models.length];
63  
64          for (int i = 0; i < models.length; i++) {
65              soapModels[i] = toSoapModel(models[i]);
66          }
67  
68          return soapModels;
69      }
70  
71      public static MBStatsUserSoap[][] toSoapModels(MBStatsUser[][] models) {
72          MBStatsUserSoap[][] soapModels = null;
73  
74          if (models.length > 0) {
75              soapModels = new MBStatsUserSoap[models.length][models[0].length];
76          }
77          else {
78              soapModels = new MBStatsUserSoap[0][0];
79          }
80  
81          for (int i = 0; i < models.length; i++) {
82              soapModels[i] = toSoapModels(models[i]);
83          }
84  
85          return soapModels;
86      }
87  
88      public static MBStatsUserSoap[] toSoapModels(List<MBStatsUser> models) {
89          List<MBStatsUserSoap> soapModels = new ArrayList<MBStatsUserSoap>(models.size());
90  
91          for (MBStatsUser model : models) {
92              soapModels.add(toSoapModel(model));
93          }
94  
95          return soapModels.toArray(new MBStatsUserSoap[soapModels.size()]);
96      }
97  
98      public MBStatsUserSoap() {
99      }
100 
101     public long getPrimaryKey() {
102         return _statsUserId;
103     }
104 
105     public void setPrimaryKey(long pk) {
106         setStatsUserId(pk);
107     }
108 
109     public long getStatsUserId() {
110         return _statsUserId;
111     }
112 
113     public void setStatsUserId(long statsUserId) {
114         _statsUserId = statsUserId;
115     }
116 
117     public long getGroupId() {
118         return _groupId;
119     }
120 
121     public void setGroupId(long groupId) {
122         _groupId = groupId;
123     }
124 
125     public long getUserId() {
126         return _userId;
127     }
128 
129     public void setUserId(long userId) {
130         _userId = userId;
131     }
132 
133     public int getMessageCount() {
134         return _messageCount;
135     }
136 
137     public void setMessageCount(int messageCount) {
138         _messageCount = messageCount;
139     }
140 
141     public Date getLastPostDate() {
142         return _lastPostDate;
143     }
144 
145     public void setLastPostDate(Date lastPostDate) {
146         _lastPostDate = lastPostDate;
147     }
148 
149     private long _statsUserId;
150     private long _groupId;
151     private long _userId;
152     private int _messageCount;
153     private Date _lastPostDate;
154 }