001: /**
002: * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
003: *
004: * Permission is hereby granted, free of charge, to any person obtaining a copy
005: * of this software and associated documentation files (the "Software"), to deal
006: * in the Software without restriction, including without limitation the rights
007: * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
008: * copies of the Software, and to permit persons to whom the Software is
009: * furnished to do so, subject to the following conditions:
010: *
011: * The above copyright notice and this permission notice shall be included in
012: * all copies or substantial portions of the Software.
013: *
014: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
015: * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
016: * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
017: * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
018: * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
019: * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
020: * SOFTWARE.
021: */package com.liferay.portlet.ratings.model;
022:
023: import java.io.Serializable;
024:
025: import java.util.ArrayList;
026: import java.util.List;
027:
028: /**
029: * <a href="RatingsStatsSoap.java.html"><b><i>View Source</i></b></a>
030: *
031: * <p>
032: * ServiceBuilder generated this class. Modifications in this class will be
033: * overwritten the next time is generated.
034: * </p>
035: *
036: * <p>
037: * This class is used by
038: * <code>com.liferay.portlet.ratings.service.http.RatingsStatsServiceSoap</code>.
039: * </p>
040: *
041: * @author Brian Wing Shun Chan
042: *
043: * @see com.liferay.portlet.ratings.service.http.RatingsStatsServiceSoap
044: *
045: */
046: public class RatingsStatsSoap implements Serializable {
047: public static RatingsStatsSoap toSoapModel(RatingsStats model) {
048: RatingsStatsSoap soapModel = new RatingsStatsSoap();
049:
050: soapModel.setStatsId(model.getStatsId());
051: soapModel.setClassNameId(model.getClassNameId());
052: soapModel.setClassPK(model.getClassPK());
053: soapModel.setTotalEntries(model.getTotalEntries());
054: soapModel.setTotalScore(model.getTotalScore());
055: soapModel.setAverageScore(model.getAverageScore());
056:
057: return soapModel;
058: }
059:
060: public static RatingsStatsSoap[] toSoapModels(List models) {
061: List soapModels = new ArrayList(models.size());
062:
063: for (int i = 0; i < models.size(); i++) {
064: RatingsStats model = (RatingsStats) models.get(i);
065:
066: soapModels.add(toSoapModel(model));
067: }
068:
069: return (RatingsStatsSoap[]) soapModels
070: .toArray(new RatingsStatsSoap[0]);
071: }
072:
073: public RatingsStatsSoap() {
074: }
075:
076: public long getPrimaryKey() {
077: return _statsId;
078: }
079:
080: public void setPrimaryKey(long pk) {
081: setStatsId(pk);
082: }
083:
084: public long getStatsId() {
085: return _statsId;
086: }
087:
088: public void setStatsId(long statsId) {
089: _statsId = statsId;
090: }
091:
092: public long getClassNameId() {
093: return _classNameId;
094: }
095:
096: public void setClassNameId(long classNameId) {
097: _classNameId = classNameId;
098: }
099:
100: public long getClassPK() {
101: return _classPK;
102: }
103:
104: public void setClassPK(long classPK) {
105: _classPK = classPK;
106: }
107:
108: public int getTotalEntries() {
109: return _totalEntries;
110: }
111:
112: public void setTotalEntries(int totalEntries) {
113: _totalEntries = totalEntries;
114: }
115:
116: public double getTotalScore() {
117: return _totalScore;
118: }
119:
120: public void setTotalScore(double totalScore) {
121: _totalScore = totalScore;
122: }
123:
124: public double getAverageScore() {
125: return _averageScore;
126: }
127:
128: public void setAverageScore(double averageScore) {
129: _averageScore = averageScore;
130: }
131:
132: private long _statsId;
133: private long _classNameId;
134: private long _classPK;
135: private int _totalEntries;
136: private double _totalScore;
137: private double _averageScore;
138: }
|