001    /**
002     * Copyright (c) 2000-present 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 aQute.bnd.annotation.ProviderType;
018    
019    import java.io.Serializable;
020    
021    import java.util.ArrayList;
022    import java.util.List;
023    
024    /**
025     * This class is used by SOAP remote services.
026     *
027     * @author Brian Wing Shun Chan
028     * @generated
029     */
030    @ProviderType
031    public class RatingsStatsSoap implements Serializable {
032            public static RatingsStatsSoap toSoapModel(RatingsStats model) {
033                    RatingsStatsSoap soapModel = new RatingsStatsSoap();
034    
035                    soapModel.setStatsId(model.getStatsId());
036                    soapModel.setClassNameId(model.getClassNameId());
037                    soapModel.setClassPK(model.getClassPK());
038                    soapModel.setTotalEntries(model.getTotalEntries());
039                    soapModel.setTotalScore(model.getTotalScore());
040                    soapModel.setAverageScore(model.getAverageScore());
041    
042                    return soapModel;
043            }
044    
045            public static RatingsStatsSoap[] toSoapModels(RatingsStats[] models) {
046                    RatingsStatsSoap[] soapModels = new RatingsStatsSoap[models.length];
047    
048                    for (int i = 0; i < models.length; i++) {
049                            soapModels[i] = toSoapModel(models[i]);
050                    }
051    
052                    return soapModels;
053            }
054    
055            public static RatingsStatsSoap[][] toSoapModels(RatingsStats[][] models) {
056                    RatingsStatsSoap[][] soapModels = null;
057    
058                    if (models.length > 0) {
059                            soapModels = new RatingsStatsSoap[models.length][models[0].length];
060                    }
061                    else {
062                            soapModels = new RatingsStatsSoap[0][0];
063                    }
064    
065                    for (int i = 0; i < models.length; i++) {
066                            soapModels[i] = toSoapModels(models[i]);
067                    }
068    
069                    return soapModels;
070            }
071    
072            public static RatingsStatsSoap[] toSoapModels(List<RatingsStats> models) {
073                    List<RatingsStatsSoap> soapModels = new ArrayList<RatingsStatsSoap>(models.size());
074    
075                    for (RatingsStats model : models) {
076                            soapModels.add(toSoapModel(model));
077                    }
078    
079                    return soapModels.toArray(new RatingsStatsSoap[soapModels.size()]);
080            }
081    
082            public RatingsStatsSoap() {
083            }
084    
085            public long getPrimaryKey() {
086                    return _statsId;
087            }
088    
089            public void setPrimaryKey(long pk) {
090                    setStatsId(pk);
091            }
092    
093            public long getStatsId() {
094                    return _statsId;
095            }
096    
097            public void setStatsId(long statsId) {
098                    _statsId = statsId;
099            }
100    
101            public long getClassNameId() {
102                    return _classNameId;
103            }
104    
105            public void setClassNameId(long classNameId) {
106                    _classNameId = classNameId;
107            }
108    
109            public long getClassPK() {
110                    return _classPK;
111            }
112    
113            public void setClassPK(long classPK) {
114                    _classPK = classPK;
115            }
116    
117            public int getTotalEntries() {
118                    return _totalEntries;
119            }
120    
121            public void setTotalEntries(int totalEntries) {
122                    _totalEntries = totalEntries;
123            }
124    
125            public double getTotalScore() {
126                    return _totalScore;
127            }
128    
129            public void setTotalScore(double totalScore) {
130                    _totalScore = totalScore;
131            }
132    
133            public double getAverageScore() {
134                    return _averageScore;
135            }
136    
137            public void setAverageScore(double averageScore) {
138                    _averageScore = averageScore;
139            }
140    
141            private long _statsId;
142            private long _classNameId;
143            private long _classPK;
144            private int _totalEntries;
145            private double _totalScore;
146            private double _averageScore;
147    }