001    /**
002     * Copyright (c) 2000-2010 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.shopping.model;
016    
017    import java.io.Serializable;
018    
019    import java.util.ArrayList;
020    import java.util.Date;
021    import java.util.List;
022    
023    /**
024     * <p>
025     * This class is used by
026     * {@link com.liferay.portlet.shopping.service.http.ShoppingCouponServiceSoap}.
027     * </p>
028     *
029     * @author    Brian Wing Shun Chan
030     * @see       com.liferay.portlet.shopping.service.http.ShoppingCouponServiceSoap
031     * @generated
032     */
033    public class ShoppingCouponSoap implements Serializable {
034            public static ShoppingCouponSoap toSoapModel(ShoppingCoupon model) {
035                    ShoppingCouponSoap soapModel = new ShoppingCouponSoap();
036    
037                    soapModel.setCouponId(model.getCouponId());
038                    soapModel.setGroupId(model.getGroupId());
039                    soapModel.setCompanyId(model.getCompanyId());
040                    soapModel.setUserId(model.getUserId());
041                    soapModel.setUserName(model.getUserName());
042                    soapModel.setCreateDate(model.getCreateDate());
043                    soapModel.setModifiedDate(model.getModifiedDate());
044                    soapModel.setCode(model.getCode());
045                    soapModel.setName(model.getName());
046                    soapModel.setDescription(model.getDescription());
047                    soapModel.setStartDate(model.getStartDate());
048                    soapModel.setEndDate(model.getEndDate());
049                    soapModel.setActive(model.getActive());
050                    soapModel.setLimitCategories(model.getLimitCategories());
051                    soapModel.setLimitSkus(model.getLimitSkus());
052                    soapModel.setMinOrder(model.getMinOrder());
053                    soapModel.setDiscount(model.getDiscount());
054                    soapModel.setDiscountType(model.getDiscountType());
055    
056                    return soapModel;
057            }
058    
059            public static ShoppingCouponSoap[] toSoapModels(ShoppingCoupon[] models) {
060                    ShoppingCouponSoap[] soapModels = new ShoppingCouponSoap[models.length];
061    
062                    for (int i = 0; i < models.length; i++) {
063                            soapModels[i] = toSoapModel(models[i]);
064                    }
065    
066                    return soapModels;
067            }
068    
069            public static ShoppingCouponSoap[][] toSoapModels(ShoppingCoupon[][] models) {
070                    ShoppingCouponSoap[][] soapModels = null;
071    
072                    if (models.length > 0) {
073                            soapModels = new ShoppingCouponSoap[models.length][models[0].length];
074                    }
075                    else {
076                            soapModels = new ShoppingCouponSoap[0][0];
077                    }
078    
079                    for (int i = 0; i < models.length; i++) {
080                            soapModels[i] = toSoapModels(models[i]);
081                    }
082    
083                    return soapModels;
084            }
085    
086            public static ShoppingCouponSoap[] toSoapModels(List<ShoppingCoupon> models) {
087                    List<ShoppingCouponSoap> soapModels = new ArrayList<ShoppingCouponSoap>(models.size());
088    
089                    for (ShoppingCoupon model : models) {
090                            soapModels.add(toSoapModel(model));
091                    }
092    
093                    return soapModels.toArray(new ShoppingCouponSoap[soapModels.size()]);
094            }
095    
096            public ShoppingCouponSoap() {
097            }
098    
099            public long getPrimaryKey() {
100                    return _couponId;
101            }
102    
103            public void setPrimaryKey(long pk) {
104                    setCouponId(pk);
105            }
106    
107            public long getCouponId() {
108                    return _couponId;
109            }
110    
111            public void setCouponId(long couponId) {
112                    _couponId = couponId;
113            }
114    
115            public long getGroupId() {
116                    return _groupId;
117            }
118    
119            public void setGroupId(long groupId) {
120                    _groupId = groupId;
121            }
122    
123            public long getCompanyId() {
124                    return _companyId;
125            }
126    
127            public void setCompanyId(long companyId) {
128                    _companyId = companyId;
129            }
130    
131            public long getUserId() {
132                    return _userId;
133            }
134    
135            public void setUserId(long userId) {
136                    _userId = userId;
137            }
138    
139            public String getUserName() {
140                    return _userName;
141            }
142    
143            public void setUserName(String userName) {
144                    _userName = userName;
145            }
146    
147            public Date getCreateDate() {
148                    return _createDate;
149            }
150    
151            public void setCreateDate(Date createDate) {
152                    _createDate = createDate;
153            }
154    
155            public Date getModifiedDate() {
156                    return _modifiedDate;
157            }
158    
159            public void setModifiedDate(Date modifiedDate) {
160                    _modifiedDate = modifiedDate;
161            }
162    
163            public String getCode() {
164                    return _code;
165            }
166    
167            public void setCode(String code) {
168                    _code = code;
169            }
170    
171            public String getName() {
172                    return _name;
173            }
174    
175            public void setName(String name) {
176                    _name = name;
177            }
178    
179            public String getDescription() {
180                    return _description;
181            }
182    
183            public void setDescription(String description) {
184                    _description = description;
185            }
186    
187            public Date getStartDate() {
188                    return _startDate;
189            }
190    
191            public void setStartDate(Date startDate) {
192                    _startDate = startDate;
193            }
194    
195            public Date getEndDate() {
196                    return _endDate;
197            }
198    
199            public void setEndDate(Date endDate) {
200                    _endDate = endDate;
201            }
202    
203            public boolean getActive() {
204                    return _active;
205            }
206    
207            public boolean isActive() {
208                    return _active;
209            }
210    
211            public void setActive(boolean active) {
212                    _active = active;
213            }
214    
215            public String getLimitCategories() {
216                    return _limitCategories;
217            }
218    
219            public void setLimitCategories(String limitCategories) {
220                    _limitCategories = limitCategories;
221            }
222    
223            public String getLimitSkus() {
224                    return _limitSkus;
225            }
226    
227            public void setLimitSkus(String limitSkus) {
228                    _limitSkus = limitSkus;
229            }
230    
231            public double getMinOrder() {
232                    return _minOrder;
233            }
234    
235            public void setMinOrder(double minOrder) {
236                    _minOrder = minOrder;
237            }
238    
239            public double getDiscount() {
240                    return _discount;
241            }
242    
243            public void setDiscount(double discount) {
244                    _discount = discount;
245            }
246    
247            public String getDiscountType() {
248                    return _discountType;
249            }
250    
251            public void setDiscountType(String discountType) {
252                    _discountType = discountType;
253            }
254    
255            private long _couponId;
256            private long _groupId;
257            private long _companyId;
258            private long _userId;
259            private String _userName;
260            private Date _createDate;
261            private Date _modifiedDate;
262            private String _code;
263            private String _name;
264            private String _description;
265            private Date _startDate;
266            private Date _endDate;
267            private boolean _active;
268            private String _limitCategories;
269            private String _limitSkus;
270            private double _minOrder;
271            private double _discount;
272            private String _discountType;
273    }