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.shopping.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="ShoppingCouponSoap.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.shopping.service.http.ShoppingCouponServiceSoap</code>.
39   * </p>
40   *
41   * @author Brian Wing Shun Chan
42   *
43   * @see com.liferay.portlet.shopping.service.http.ShoppingCouponServiceSoap
44   *
45   */
46  public class ShoppingCouponSoap implements Serializable {
47      public static ShoppingCouponSoap toSoapModel(ShoppingCoupon model) {
48          ShoppingCouponSoap soapModel = new ShoppingCouponSoap();
49  
50          soapModel.setCouponId(model.getCouponId());
51          soapModel.setGroupId(model.getGroupId());
52          soapModel.setCompanyId(model.getCompanyId());
53          soapModel.setUserId(model.getUserId());
54          soapModel.setUserName(model.getUserName());
55          soapModel.setCreateDate(model.getCreateDate());
56          soapModel.setModifiedDate(model.getModifiedDate());
57          soapModel.setCode(model.getCode());
58          soapModel.setName(model.getName());
59          soapModel.setDescription(model.getDescription());
60          soapModel.setStartDate(model.getStartDate());
61          soapModel.setEndDate(model.getEndDate());
62          soapModel.setActive(model.getActive());
63          soapModel.setLimitCategories(model.getLimitCategories());
64          soapModel.setLimitSkus(model.getLimitSkus());
65          soapModel.setMinOrder(model.getMinOrder());
66          soapModel.setDiscount(model.getDiscount());
67          soapModel.setDiscountType(model.getDiscountType());
68  
69          return soapModel;
70      }
71  
72      public static ShoppingCouponSoap[] toSoapModels(List<ShoppingCoupon> models) {
73          List<ShoppingCouponSoap> soapModels = new ArrayList<ShoppingCouponSoap>(models.size());
74  
75          for (ShoppingCoupon model : models) {
76              soapModels.add(toSoapModel(model));
77          }
78  
79          return soapModels.toArray(new ShoppingCouponSoap[soapModels.size()]);
80      }
81  
82      public ShoppingCouponSoap() {
83      }
84  
85      public long getPrimaryKey() {
86          return _couponId;
87      }
88  
89      public void setPrimaryKey(long pk) {
90          setCouponId(pk);
91      }
92  
93      public long getCouponId() {
94          return _couponId;
95      }
96  
97      public void setCouponId(long couponId) {
98          _couponId = couponId;
99      }
100 
101     public long getGroupId() {
102         return _groupId;
103     }
104 
105     public void setGroupId(long groupId) {
106         _groupId = groupId;
107     }
108 
109     public long getCompanyId() {
110         return _companyId;
111     }
112 
113     public void setCompanyId(long companyId) {
114         _companyId = companyId;
115     }
116 
117     public long getUserId() {
118         return _userId;
119     }
120 
121     public void setUserId(long userId) {
122         _userId = userId;
123     }
124 
125     public String getUserName() {
126         return _userName;
127     }
128 
129     public void setUserName(String userName) {
130         _userName = userName;
131     }
132 
133     public Date getCreateDate() {
134         return _createDate;
135     }
136 
137     public void setCreateDate(Date createDate) {
138         _createDate = createDate;
139     }
140 
141     public Date getModifiedDate() {
142         return _modifiedDate;
143     }
144 
145     public void setModifiedDate(Date modifiedDate) {
146         _modifiedDate = modifiedDate;
147     }
148 
149     public String getCode() {
150         return _code;
151     }
152 
153     public void setCode(String code) {
154         _code = code;
155     }
156 
157     public String getName() {
158         return _name;
159     }
160 
161     public void setName(String name) {
162         _name = name;
163     }
164 
165     public String getDescription() {
166         return _description;
167     }
168 
169     public void setDescription(String description) {
170         _description = description;
171     }
172 
173     public Date getStartDate() {
174         return _startDate;
175     }
176 
177     public void setStartDate(Date startDate) {
178         _startDate = startDate;
179     }
180 
181     public Date getEndDate() {
182         return _endDate;
183     }
184 
185     public void setEndDate(Date endDate) {
186         _endDate = endDate;
187     }
188 
189     public boolean getActive() {
190         return _active;
191     }
192 
193     public boolean isActive() {
194         return _active;
195     }
196 
197     public void setActive(boolean active) {
198         _active = active;
199     }
200 
201     public String getLimitCategories() {
202         return _limitCategories;
203     }
204 
205     public void setLimitCategories(String limitCategories) {
206         _limitCategories = limitCategories;
207     }
208 
209     public String getLimitSkus() {
210         return _limitSkus;
211     }
212 
213     public void setLimitSkus(String limitSkus) {
214         _limitSkus = limitSkus;
215     }
216 
217     public double getMinOrder() {
218         return _minOrder;
219     }
220 
221     public void setMinOrder(double minOrder) {
222         _minOrder = minOrder;
223     }
224 
225     public double getDiscount() {
226         return _discount;
227     }
228 
229     public void setDiscount(double discount) {
230         _discount = discount;
231     }
232 
233     public String getDiscountType() {
234         return _discountType;
235     }
236 
237     public void setDiscountType(String discountType) {
238         _discountType = discountType;
239     }
240 
241     private long _couponId;
242     private long _groupId;
243     private long _companyId;
244     private long _userId;
245     private String _userName;
246     private Date _createDate;
247     private Date _modifiedDate;
248     private String _code;
249     private String _name;
250     private String _description;
251     private Date _startDate;
252     private Date _endDate;
253     private boolean _active;
254     private String _limitCategories;
255     private String _limitSkus;
256     private double _minOrder;
257     private double _discount;
258     private String _discountType;
259 }