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.Date;
21  import java.util.List;
22  
23  /**
24   * <a href="MBStatsUserSoap.java.html"><b><i>View Source</i></b></a>
25   *
26   * <p>
27   * ServiceBuilder generated this class. Modifications in this class will be
28   * overwritten the next time is generated.
29   * </p>
30   *
31   * <p>
32   * This class is used by
33   * {@link com.liferay.portlet.messageboards.service.http.MBStatsUserServiceSoap}.
34   * </p>
35   *
36   * @author    Brian Wing Shun Chan
37   * @see       com.liferay.portlet.messageboards.service.http.MBStatsUserServiceSoap
38   * @generated
39   */
40  public class MBStatsUserSoap implements Serializable {
41      public static MBStatsUserSoap toSoapModel(MBStatsUser model) {
42          MBStatsUserSoap soapModel = new MBStatsUserSoap();
43  
44          soapModel.setStatsUserId(model.getStatsUserId());
45          soapModel.setGroupId(model.getGroupId());
46          soapModel.setUserId(model.getUserId());
47          soapModel.setMessageCount(model.getMessageCount());
48          soapModel.setLastPostDate(model.getLastPostDate());
49  
50          return soapModel;
51      }
52  
53      public static MBStatsUserSoap[] toSoapModels(MBStatsUser[] models) {
54          MBStatsUserSoap[] soapModels = new MBStatsUserSoap[models.length];
55  
56          for (int i = 0; i < models.length; i++) {
57              soapModels[i] = toSoapModel(models[i]);
58          }
59  
60          return soapModels;
61      }
62  
63      public static MBStatsUserSoap[][] toSoapModels(MBStatsUser[][] models) {
64          MBStatsUserSoap[][] soapModels = null;
65  
66          if (models.length > 0) {
67              soapModels = new MBStatsUserSoap[models.length][models[0].length];
68          }
69          else {
70              soapModels = new MBStatsUserSoap[0][0];
71          }
72  
73          for (int i = 0; i < models.length; i++) {
74              soapModels[i] = toSoapModels(models[i]);
75          }
76  
77          return soapModels;
78      }
79  
80      public static MBStatsUserSoap[] toSoapModels(List<MBStatsUser> models) {
81          List<MBStatsUserSoap> soapModels = new ArrayList<MBStatsUserSoap>(models.size());
82  
83          for (MBStatsUser model : models) {
84              soapModels.add(toSoapModel(model));
85          }
86  
87          return soapModels.toArray(new MBStatsUserSoap[soapModels.size()]);
88      }
89  
90      public MBStatsUserSoap() {
91      }
92  
93      public long getPrimaryKey() {
94          return _statsUserId;
95      }
96  
97      public void setPrimaryKey(long pk) {
98          setStatsUserId(pk);
99      }
100 
101     public long getStatsUserId() {
102         return _statsUserId;
103     }
104 
105     public void setStatsUserId(long statsUserId) {
106         _statsUserId = statsUserId;
107     }
108 
109     public long getGroupId() {
110         return _groupId;
111     }
112 
113     public void setGroupId(long groupId) {
114         _groupId = groupId;
115     }
116 
117     public long getUserId() {
118         return _userId;
119     }
120 
121     public void setUserId(long userId) {
122         _userId = userId;
123     }
124 
125     public int getMessageCount() {
126         return _messageCount;
127     }
128 
129     public void setMessageCount(int messageCount) {
130         _messageCount = messageCount;
131     }
132 
133     public Date getLastPostDate() {
134         return _lastPostDate;
135     }
136 
137     public void setLastPostDate(Date lastPostDate) {
138         _lastPostDate = lastPostDate;
139     }
140 
141     private long _statsUserId;
142     private long _groupId;
143     private long _userId;
144     private int _messageCount;
145     private Date _lastPostDate;
146 }