1   /**
2    * Copyright (c) 2000-2007 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.shopping.model;
24  
25  import java.io.Serializable;
26  
27  import java.util.ArrayList;
28  import java.util.Date;
29  import java.util.List;
30  
31  /**
32   * <a href="ShoppingCouponSoap.java.html"><b><i>View Source</i></b></a>
33   *
34   * <p>
35   * ServiceBuilder generated this class. Modifications in this class will be overwritten
36   * the next time is generated.
37   * </p>
38   *
39   * <p>
40   * This class is used by <code>com.liferay.portlet.shopping.service.http.ShoppingCouponServiceSoap</code>.
41   * </p>
42   *
43   * @author Brian Wing Shun Chan
44   *
45   * @see com.liferay.portlet.shopping.service.http.ShoppingCouponServiceSoap
46   *
47   */
48  public class ShoppingCouponSoap implements Serializable {
49      public static ShoppingCouponSoap toSoapModel(ShoppingCoupon model) {
50          ShoppingCouponSoap soapModel = new ShoppingCouponSoap();
51          soapModel.setCouponId(model.getCouponId());
52          soapModel.setGroupId(model.getGroupId());
53          soapModel.setCompanyId(model.getCompanyId());
54          soapModel.setUserId(model.getUserId());
55          soapModel.setUserName(model.getUserName());
56          soapModel.setCreateDate(model.getCreateDate());
57          soapModel.setModifiedDate(model.getModifiedDate());
58          soapModel.setCode(model.getCode());
59          soapModel.setName(model.getName());
60          soapModel.setDescription(model.getDescription());
61          soapModel.setStartDate(model.getStartDate());
62          soapModel.setEndDate(model.getEndDate());
63          soapModel.setActive(model.getActive());
64          soapModel.setLimitCategories(model.getLimitCategories());
65          soapModel.setLimitSkus(model.getLimitSkus());
66          soapModel.setMinOrder(model.getMinOrder());
67          soapModel.setDiscount(model.getDiscount());
68          soapModel.setDiscountType(model.getDiscountType());
69  
70          return soapModel;
71      }
72  
73      public static ShoppingCouponSoap[] toSoapModels(List models) {
74          List soapModels = new ArrayList(models.size());
75  
76          for (int i = 0; i < models.size(); i++) {
77              ShoppingCoupon model = (ShoppingCoupon)models.get(i);
78              soapModels.add(toSoapModel(model));
79          }
80  
81          return (ShoppingCouponSoap[])soapModels.toArray(new ShoppingCouponSoap[0]);
82      }
83  
84      public ShoppingCouponSoap() {
85      }
86  
87      public long getPrimaryKey() {
88          return _couponId;
89      }
90  
91      public void setPrimaryKey(long pk) {
92          setCouponId(pk);
93      }
94  
95      public long getCouponId() {
96          return _couponId;
97      }
98  
99      public void setCouponId(long couponId) {
100         _couponId = couponId;
101     }
102 
103     public long getGroupId() {
104         return _groupId;
105     }
106 
107     public void setGroupId(long groupId) {
108         _groupId = groupId;
109     }
110 
111     public long getCompanyId() {
112         return _companyId;
113     }
114 
115     public void setCompanyId(long companyId) {
116         _companyId = companyId;
117     }
118 
119     public long getUserId() {
120         return _userId;
121     }
122 
123     public void setUserId(long userId) {
124         _userId = userId;
125     }
126 
127     public String getUserName() {
128         return _userName;
129     }
130 
131     public void setUserName(String userName) {
132         _userName = userName;
133     }
134 
135     public Date getCreateDate() {
136         return _createDate;
137     }
138 
139     public void setCreateDate(Date createDate) {
140         _createDate = createDate;
141     }
142 
143     public Date getModifiedDate() {
144         return _modifiedDate;
145     }
146 
147     public void setModifiedDate(Date modifiedDate) {
148         _modifiedDate = modifiedDate;
149     }
150 
151     public String getCode() {
152         return _code;
153     }
154 
155     public void setCode(String code) {
156         _code = code;
157     }
158 
159     public String getName() {
160         return _name;
161     }
162 
163     public void setName(String name) {
164         _name = name;
165     }
166 
167     public String getDescription() {
168         return _description;
169     }
170 
171     public void setDescription(String description) {
172         _description = description;
173     }
174 
175     public Date getStartDate() {
176         return _startDate;
177     }
178 
179     public void setStartDate(Date startDate) {
180         _startDate = startDate;
181     }
182 
183     public Date getEndDate() {
184         return _endDate;
185     }
186 
187     public void setEndDate(Date endDate) {
188         _endDate = endDate;
189     }
190 
191     public boolean getActive() {
192         return _active;
193     }
194 
195     public boolean isActive() {
196         return _active;
197     }
198 
199     public void setActive(boolean active) {
200         _active = active;
201     }
202 
203     public String getLimitCategories() {
204         return _limitCategories;
205     }
206 
207     public void setLimitCategories(String limitCategories) {
208         _limitCategories = limitCategories;
209     }
210 
211     public String getLimitSkus() {
212         return _limitSkus;
213     }
214 
215     public void setLimitSkus(String limitSkus) {
216         _limitSkus = limitSkus;
217     }
218 
219     public double getMinOrder() {
220         return _minOrder;
221     }
222 
223     public void setMinOrder(double minOrder) {
224         _minOrder = minOrder;
225     }
226 
227     public double getDiscount() {
228         return _discount;
229     }
230 
231     public void setDiscount(double discount) {
232         _discount = discount;
233     }
234 
235     public String getDiscountType() {
236         return _discountType;
237     }
238 
239     public void setDiscountType(String discountType) {
240         _discountType = discountType;
241     }
242 
243     private long _couponId;
244     private long _groupId;
245     private long _companyId;
246     private long _userId;
247     private String _userName;
248     private Date _createDate;
249     private Date _modifiedDate;
250     private String _code;
251     private String _name;
252     private String _description;
253     private Date _startDate;
254     private Date _endDate;
255     private boolean _active;
256     private String _limitCategories;
257     private String _limitSkus;
258     private double _minOrder;
259     private double _discount;
260     private String _discountType;
261 }