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.setCompanyId(model.getCompanyId());
037                    soapModel.setClassNameId(model.getClassNameId());
038                    soapModel.setClassPK(model.getClassPK());
039                    soapModel.setTotalEntries(model.getTotalEntries());
040                    soapModel.setTotalScore(model.getTotalScore());
041                    soapModel.setAverageScore(model.getAverageScore());
042    
043                    return soapModel;
044            }
045    
046            public static RatingsStatsSoap[] toSoapModels(RatingsStats[] models) {
047                    RatingsStatsSoap[] soapModels = new RatingsStatsSoap[models.length];
048    
049                    for (int i = 0; i < models.length; i++) {
050                            soapModels[i] = toSoapModel(models[i]);
051                    }
052    
053                    return soapModels;
054            }
055    
056            public static RatingsStatsSoap[][] toSoapModels(RatingsStats[][] models) {
057                    RatingsStatsSoap[][] soapModels = null;
058    
059                    if (models.length > 0) {
060                            soapModels = new RatingsStatsSoap[models.length][models[0].length];
061                    }
062                    else {
063                            soapModels = new RatingsStatsSoap[0][0];
064                    }
065    
066                    for (int i = 0; i < models.length; i++) {
067                            soapModels[i] = toSoapModels(models[i]);
068                    }
069    
070                    return soapModels;
071            }
072    
073            public static RatingsStatsSoap[] toSoapModels(List<RatingsStats> models) {
074                    List<RatingsStatsSoap> soapModels = new ArrayList<RatingsStatsSoap>(models.size());
075    
076                    for (RatingsStats model : models) {
077                            soapModels.add(toSoapModel(model));
078                    }
079    
080                    return soapModels.toArray(new RatingsStatsSoap[soapModels.size()]);
081            }
082    
083            public RatingsStatsSoap() {
084            }
085    
086            public long getPrimaryKey() {
087                    return _statsId;
088            }
089    
090            public void setPrimaryKey(long pk) {
091                    setStatsId(pk);
092            }
093    
094            public long getStatsId() {
095                    return _statsId;
096            }
097    
098            public void setStatsId(long statsId) {
099                    _statsId = statsId;
100            }
101    
102            public long getCompanyId() {
103                    return _companyId;
104            }
105    
106            public void setCompanyId(long companyId) {
107                    _companyId = companyId;
108            }
109    
110            public long getClassNameId() {
111                    return _classNameId;
112            }
113    
114            public void setClassNameId(long classNameId) {
115                    _classNameId = classNameId;
116            }
117    
118            public long getClassPK() {
119                    return _classPK;
120            }
121    
122            public void setClassPK(long classPK) {
123                    _classPK = classPK;
124            }
125    
126            public int getTotalEntries() {
127                    return _totalEntries;
128            }
129    
130            public void setTotalEntries(int totalEntries) {
131                    _totalEntries = totalEntries;
132            }
133    
134            public double getTotalScore() {
135                    return _totalScore;
136            }
137    
138            public void setTotalScore(double totalScore) {
139                    _totalScore = totalScore;
140            }
141    
142            public double getAverageScore() {
143                    return _averageScore;
144            }
145    
146            public void setAverageScore(double averageScore) {
147                    _averageScore = averageScore;
148            }
149    
150            private long _statsId;
151            private long _companyId;
152            private long _classNameId;
153            private long _classPK;
154            private int _totalEntries;
155            private double _totalScore;
156            private double _averageScore;
157    }