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.Date;
26  import java.util.List;
27  
28  /**
29   * <a href="RatingsEntrySoap.java.html"><b><i>View Source</i></b></a>
30   *
31   * <p>
32   * ServiceBuilder generated this class. Modifications in this class will be
33   * overwritten the next time is generated.
34   * </p>
35   *
36   * <p>
37   * This class is used by
38   * <code>com.liferay.portlet.ratings.service.http.RatingsEntryServiceSoap</code>.
39   * </p>
40   *
41   * @author Brian Wing Shun Chan
42   *
43   * @see com.liferay.portlet.ratings.service.http.RatingsEntryServiceSoap
44   *
45   */
46  public class RatingsEntrySoap implements Serializable {
47      public static RatingsEntrySoap toSoapModel(RatingsEntry model) {
48          RatingsEntrySoap soapModel = new RatingsEntrySoap();
49  
50          soapModel.setEntryId(model.getEntryId());
51          soapModel.setCompanyId(model.getCompanyId());
52          soapModel.setUserId(model.getUserId());
53          soapModel.setUserName(model.getUserName());
54          soapModel.setCreateDate(model.getCreateDate());
55          soapModel.setModifiedDate(model.getModifiedDate());
56          soapModel.setClassNameId(model.getClassNameId());
57          soapModel.setClassPK(model.getClassPK());
58          soapModel.setScore(model.getScore());
59  
60          return soapModel;
61      }
62  
63      public static RatingsEntrySoap[] toSoapModels(RatingsEntry[] models) {
64          RatingsEntrySoap[] soapModels = new RatingsEntrySoap[models.length];
65  
66          for (int i = 0; i < models.length; i++) {
67              soapModels[i] = toSoapModel(models[i]);
68          }
69  
70          return soapModels;
71      }
72  
73      public static RatingsEntrySoap[][] toSoapModels(RatingsEntry[][] models) {
74          RatingsEntrySoap[][] soapModels = null;
75  
76          if (models.length > 0) {
77              soapModels = new RatingsEntrySoap[models.length][models[0].length];
78          }
79          else {
80              soapModels = new RatingsEntrySoap[0][0];
81          }
82  
83          for (int i = 0; i < models.length; i++) {
84              soapModels[i] = toSoapModels(models[i]);
85          }
86  
87          return soapModels;
88      }
89  
90      public static RatingsEntrySoap[] toSoapModels(List<RatingsEntry> models) {
91          List<RatingsEntrySoap> soapModels = new ArrayList<RatingsEntrySoap>(models.size());
92  
93          for (RatingsEntry model : models) {
94              soapModels.add(toSoapModel(model));
95          }
96  
97          return soapModels.toArray(new RatingsEntrySoap[soapModels.size()]);
98      }
99  
100     public RatingsEntrySoap() {
101     }
102 
103     public long getPrimaryKey() {
104         return _entryId;
105     }
106 
107     public void setPrimaryKey(long pk) {
108         setEntryId(pk);
109     }
110 
111     public long getEntryId() {
112         return _entryId;
113     }
114 
115     public void setEntryId(long entryId) {
116         _entryId = entryId;
117     }
118 
119     public long getCompanyId() {
120         return _companyId;
121     }
122 
123     public void setCompanyId(long companyId) {
124         _companyId = companyId;
125     }
126 
127     public long getUserId() {
128         return _userId;
129     }
130 
131     public void setUserId(long userId) {
132         _userId = userId;
133     }
134 
135     public String getUserName() {
136         return _userName;
137     }
138 
139     public void setUserName(String userName) {
140         _userName = userName;
141     }
142 
143     public Date getCreateDate() {
144         return _createDate;
145     }
146 
147     public void setCreateDate(Date createDate) {
148         _createDate = createDate;
149     }
150 
151     public Date getModifiedDate() {
152         return _modifiedDate;
153     }
154 
155     public void setModifiedDate(Date modifiedDate) {
156         _modifiedDate = modifiedDate;
157     }
158 
159     public long getClassNameId() {
160         return _classNameId;
161     }
162 
163     public void setClassNameId(long classNameId) {
164         _classNameId = classNameId;
165     }
166 
167     public long getClassPK() {
168         return _classPK;
169     }
170 
171     public void setClassPK(long classPK) {
172         _classPK = classPK;
173     }
174 
175     public double getScore() {
176         return _score;
177     }
178 
179     public void setScore(double score) {
180         _score = score;
181     }
182 
183     private long _entryId;
184     private long _companyId;
185     private long _userId;
186     private String _userName;
187     private Date _createDate;
188     private Date _modifiedDate;
189     private long _classNameId;
190     private long _classPK;
191     private double _score;
192 }