1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17   * SOFTWARE.
18   */
19  
20  package com.liferay.portlet.blogs.model;
21  
22  import java.io.Serializable;
23  
24  import java.util.ArrayList;
25  import java.util.Date;
26  import java.util.List;
27  
28  /**
29   * <a href="BlogsStatsUserSoap.java.html"><b><i>View Source</i></b></a>
30   *
31   * <p>
32   * ServiceBuilder generated this class. Modifications in this class will be
33   * overwritten the next time is generated.
34   * </p>
35   *
36   * <p>
37   * This class is used by
38   * <code>com.liferay.portlet.blogs.service.http.BlogsStatsUserServiceSoap</code>.
39   * </p>
40   *
41   * @author Brian Wing Shun Chan
42   *
43   * @see com.liferay.portlet.blogs.service.http.BlogsStatsUserServiceSoap
44   *
45   */
46  public class BlogsStatsUserSoap implements Serializable {
47      public static BlogsStatsUserSoap toSoapModel(BlogsStatsUser model) {
48          BlogsStatsUserSoap soapModel = new BlogsStatsUserSoap();
49  
50          soapModel.setStatsUserId(model.getStatsUserId());
51          soapModel.setGroupId(model.getGroupId());
52          soapModel.setCompanyId(model.getCompanyId());
53          soapModel.setUserId(model.getUserId());
54          soapModel.setEntryCount(model.getEntryCount());
55          soapModel.setLastPostDate(model.getLastPostDate());
56          soapModel.setRatingsTotalEntries(model.getRatingsTotalEntries());
57          soapModel.setRatingsTotalScore(model.getRatingsTotalScore());
58          soapModel.setRatingsAverageScore(model.getRatingsAverageScore());
59  
60          return soapModel;
61      }
62  
63      public static BlogsStatsUserSoap[] toSoapModels(BlogsStatsUser[] models) {
64          BlogsStatsUserSoap[] soapModels = new BlogsStatsUserSoap[models.length];
65  
66          for (int i = 0; i < models.length; i++) {
67              soapModels[i] = toSoapModel(models[i]);
68          }
69  
70          return soapModels;
71      }
72  
73      public static BlogsStatsUserSoap[][] toSoapModels(BlogsStatsUser[][] models) {
74          BlogsStatsUserSoap[][] soapModels = null;
75  
76          if (models.length > 0) {
77              soapModels = new BlogsStatsUserSoap[models.length][models[0].length];
78          }
79          else {
80              soapModels = new BlogsStatsUserSoap[0][0];
81          }
82  
83          for (int i = 0; i < models.length; i++) {
84              soapModels[i] = toSoapModels(models[i]);
85          }
86  
87          return soapModels;
88      }
89  
90      public static BlogsStatsUserSoap[] toSoapModels(List<BlogsStatsUser> models) {
91          List<BlogsStatsUserSoap> soapModels = new ArrayList<BlogsStatsUserSoap>(models.size());
92  
93          for (BlogsStatsUser model : models) {
94              soapModels.add(toSoapModel(model));
95          }
96  
97          return soapModels.toArray(new BlogsStatsUserSoap[soapModels.size()]);
98      }
99  
100     public BlogsStatsUserSoap() {
101     }
102 
103     public long getPrimaryKey() {
104         return _statsUserId;
105     }
106 
107     public void setPrimaryKey(long pk) {
108         setStatsUserId(pk);
109     }
110 
111     public long getStatsUserId() {
112         return _statsUserId;
113     }
114 
115     public void setStatsUserId(long statsUserId) {
116         _statsUserId = statsUserId;
117     }
118 
119     public long getGroupId() {
120         return _groupId;
121     }
122 
123     public void setGroupId(long groupId) {
124         _groupId = groupId;
125     }
126 
127     public long getCompanyId() {
128         return _companyId;
129     }
130 
131     public void setCompanyId(long companyId) {
132         _companyId = companyId;
133     }
134 
135     public long getUserId() {
136         return _userId;
137     }
138 
139     public void setUserId(long userId) {
140         _userId = userId;
141     }
142 
143     public int getEntryCount() {
144         return _entryCount;
145     }
146 
147     public void setEntryCount(int entryCount) {
148         _entryCount = entryCount;
149     }
150 
151     public Date getLastPostDate() {
152         return _lastPostDate;
153     }
154 
155     public void setLastPostDate(Date lastPostDate) {
156         _lastPostDate = lastPostDate;
157     }
158 
159     public int getRatingsTotalEntries() {
160         return _ratingsTotalEntries;
161     }
162 
163     public void setRatingsTotalEntries(int ratingsTotalEntries) {
164         _ratingsTotalEntries = ratingsTotalEntries;
165     }
166 
167     public double getRatingsTotalScore() {
168         return _ratingsTotalScore;
169     }
170 
171     public void setRatingsTotalScore(double ratingsTotalScore) {
172         _ratingsTotalScore = ratingsTotalScore;
173     }
174 
175     public double getRatingsAverageScore() {
176         return _ratingsAverageScore;
177     }
178 
179     public void setRatingsAverageScore(double ratingsAverageScore) {
180         _ratingsAverageScore = ratingsAverageScore;
181     }
182 
183     private long _statsUserId;
184     private long _groupId;
185     private long _companyId;
186     private long _userId;
187     private int _entryCount;
188     private Date _lastPostDate;
189     private int _ratingsTotalEntries;
190     private double _ratingsTotalScore;
191     private double _ratingsAverageScore;
192 }