001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.ratings.model;
016    
017    import java.io.Serializable;
018    
019    import java.util.ArrayList;
020    import java.util.List;
021    
022    /**
023     * This class is used by SOAP remote services.
024     *
025     * @author    Brian Wing Shun Chan
026     * @generated
027     */
028    public class RatingsStatsSoap implements Serializable {
029            public static RatingsStatsSoap toSoapModel(RatingsStats model) {
030                    RatingsStatsSoap soapModel = new RatingsStatsSoap();
031    
032                    soapModel.setStatsId(model.getStatsId());
033                    soapModel.setClassNameId(model.getClassNameId());
034                    soapModel.setClassPK(model.getClassPK());
035                    soapModel.setTotalEntries(model.getTotalEntries());
036                    soapModel.setTotalScore(model.getTotalScore());
037                    soapModel.setAverageScore(model.getAverageScore());
038    
039                    return soapModel;
040            }
041    
042            public static RatingsStatsSoap[] toSoapModels(RatingsStats[] models) {
043                    RatingsStatsSoap[] soapModels = new RatingsStatsSoap[models.length];
044    
045                    for (int i = 0; i < models.length; i++) {
046                            soapModels[i] = toSoapModel(models[i]);
047                    }
048    
049                    return soapModels;
050            }
051    
052            public static RatingsStatsSoap[][] toSoapModels(RatingsStats[][] models) {
053                    RatingsStatsSoap[][] soapModels = null;
054    
055                    if (models.length > 0) {
056                            soapModels = new RatingsStatsSoap[models.length][models[0].length];
057                    }
058                    else {
059                            soapModels = new RatingsStatsSoap[0][0];
060                    }
061    
062                    for (int i = 0; i < models.length; i++) {
063                            soapModels[i] = toSoapModels(models[i]);
064                    }
065    
066                    return soapModels;
067            }
068    
069            public static RatingsStatsSoap[] toSoapModels(List<RatingsStats> models) {
070                    List<RatingsStatsSoap> soapModels = new ArrayList<RatingsStatsSoap>(models.size());
071    
072                    for (RatingsStats model : models) {
073                            soapModels.add(toSoapModel(model));
074                    }
075    
076                    return soapModels.toArray(new RatingsStatsSoap[soapModels.size()]);
077            }
078    
079            public RatingsStatsSoap() {
080            }
081    
082            public long getPrimaryKey() {
083                    return _statsId;
084            }
085    
086            public void setPrimaryKey(long pk) {
087                    setStatsId(pk);
088            }
089    
090            public long getStatsId() {
091                    return _statsId;
092            }
093    
094            public void setStatsId(long statsId) {
095                    _statsId = statsId;
096            }
097    
098            public long getClassNameId() {
099                    return _classNameId;
100            }
101    
102            public void setClassNameId(long classNameId) {
103                    _classNameId = classNameId;
104            }
105    
106            public long getClassPK() {
107                    return _classPK;
108            }
109    
110            public void setClassPK(long classPK) {
111                    _classPK = classPK;
112            }
113    
114            public int getTotalEntries() {
115                    return _totalEntries;
116            }
117    
118            public void setTotalEntries(int totalEntries) {
119                    _totalEntries = totalEntries;
120            }
121    
122            public double getTotalScore() {
123                    return _totalScore;
124            }
125    
126            public void setTotalScore(double totalScore) {
127                    _totalScore = totalScore;
128            }
129    
130            public double getAverageScore() {
131                    return _averageScore;
132            }
133    
134            public void setAverageScore(double averageScore) {
135                    _averageScore = averageScore;
136            }
137    
138            private long _statsId;
139            private long _classNameId;
140            private long _classPK;
141            private int _totalEntries;
142            private double _totalScore;
143            private double _averageScore;
144    }