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.ratings.model;
21  
22  import java.io.Serializable;
23  
24  import java.util.ArrayList;
25  import java.util.List;
26  
27  /**
28   * <a href="RatingsStatsSoap.java.html"><b><i>View Source</i></b></a>
29   *
30   * <p>
31   * ServiceBuilder generated this class. Modifications in this class will be
32   * overwritten the next time is generated.
33   * </p>
34   *
35   * <p>
36   * This class is used by
37   * <code>com.liferay.portlet.ratings.service.http.RatingsStatsServiceSoap</code>.
38   * </p>
39   *
40   * @author Brian Wing Shun Chan
41   *
42   * @see com.liferay.portlet.ratings.service.http.RatingsStatsServiceSoap
43   *
44   */
45  public class RatingsStatsSoap implements Serializable {
46      public static RatingsStatsSoap toSoapModel(RatingsStats model) {
47          RatingsStatsSoap soapModel = new RatingsStatsSoap();
48  
49          soapModel.setStatsId(model.getStatsId());
50          soapModel.setClassNameId(model.getClassNameId());
51          soapModel.setClassPK(model.getClassPK());
52          soapModel.setTotalEntries(model.getTotalEntries());
53          soapModel.setTotalScore(model.getTotalScore());
54          soapModel.setAverageScore(model.getAverageScore());
55  
56          return soapModel;
57      }
58  
59      public static RatingsStatsSoap[] toSoapModels(List<RatingsStats> models) {
60          List<RatingsStatsSoap> soapModels = new ArrayList<RatingsStatsSoap>(models.size());
61  
62          for (RatingsStats model : models) {
63              soapModels.add(toSoapModel(model));
64          }
65  
66          return soapModels.toArray(new RatingsStatsSoap[soapModels.size()]);
67      }
68  
69      public RatingsStatsSoap() {
70      }
71  
72      public long getPrimaryKey() {
73          return _statsId;
74      }
75  
76      public void setPrimaryKey(long pk) {
77          setStatsId(pk);
78      }
79  
80      public long getStatsId() {
81          return _statsId;
82      }
83  
84      public void setStatsId(long statsId) {
85          _statsId = statsId;
86      }
87  
88      public long getClassNameId() {
89          return _classNameId;
90      }
91  
92      public void setClassNameId(long classNameId) {
93          _classNameId = classNameId;
94      }
95  
96      public long getClassPK() {
97          return _classPK;
98      }
99  
100     public void setClassPK(long classPK) {
101         _classPK = classPK;
102     }
103 
104     public int getTotalEntries() {
105         return _totalEntries;
106     }
107 
108     public void setTotalEntries(int totalEntries) {
109         _totalEntries = totalEntries;
110     }
111 
112     public double getTotalScore() {
113         return _totalScore;
114     }
115 
116     public void setTotalScore(double totalScore) {
117         _totalScore = totalScore;
118     }
119 
120     public double getAverageScore() {
121         return _averageScore;
122     }
123 
124     public void setAverageScore(double averageScore) {
125         _averageScore = averageScore;
126     }
127 
128     private long _statsId;
129     private long _classNameId;
130     private long _classPK;
131     private int _totalEntries;
132     private double _totalScore;
133     private double _averageScore;
134 }