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.List;
29  
30  /**
31   * <a href="ShoppingItemPriceSoap.java.html"><b><i>View Source</i></b></a>
32   *
33   * <p>
34   * ServiceBuilder generated this class. Modifications in this class will be overwritten
35   * the next time is generated.
36   * </p>
37   *
38   * <p>
39   * This class is used by <code>com.liferay.portlet.shopping.service.http.ShoppingItemPriceServiceSoap</code>.
40   * </p>
41   *
42   * @author Brian Wing Shun Chan
43   *
44   * @see com.liferay.portlet.shopping.service.http.ShoppingItemPriceServiceSoap
45   *
46   */
47  public class ShoppingItemPriceSoap implements Serializable {
48      public static ShoppingItemPriceSoap toSoapModel(ShoppingItemPrice model) {
49          ShoppingItemPriceSoap soapModel = new ShoppingItemPriceSoap();
50          soapModel.setItemPriceId(model.getItemPriceId());
51          soapModel.setItemId(model.getItemId());
52          soapModel.setMinQuantity(model.getMinQuantity());
53          soapModel.setMaxQuantity(model.getMaxQuantity());
54          soapModel.setPrice(model.getPrice());
55          soapModel.setDiscount(model.getDiscount());
56          soapModel.setTaxable(model.getTaxable());
57          soapModel.setShipping(model.getShipping());
58          soapModel.setUseShippingFormula(model.getUseShippingFormula());
59          soapModel.setStatus(model.getStatus());
60  
61          return soapModel;
62      }
63  
64      public static ShoppingItemPriceSoap[] toSoapModels(List models) {
65          List soapModels = new ArrayList(models.size());
66  
67          for (int i = 0; i < models.size(); i++) {
68              ShoppingItemPrice model = (ShoppingItemPrice)models.get(i);
69              soapModels.add(toSoapModel(model));
70          }
71  
72          return (ShoppingItemPriceSoap[])soapModels.toArray(new ShoppingItemPriceSoap[0]);
73      }
74  
75      public ShoppingItemPriceSoap() {
76      }
77  
78      public long getPrimaryKey() {
79          return _itemPriceId;
80      }
81  
82      public void setPrimaryKey(long pk) {
83          setItemPriceId(pk);
84      }
85  
86      public long getItemPriceId() {
87          return _itemPriceId;
88      }
89  
90      public void setItemPriceId(long itemPriceId) {
91          _itemPriceId = itemPriceId;
92      }
93  
94      public long getItemId() {
95          return _itemId;
96      }
97  
98      public void setItemId(long itemId) {
99          _itemId = itemId;
100     }
101 
102     public int getMinQuantity() {
103         return _minQuantity;
104     }
105 
106     public void setMinQuantity(int minQuantity) {
107         _minQuantity = minQuantity;
108     }
109 
110     public int getMaxQuantity() {
111         return _maxQuantity;
112     }
113 
114     public void setMaxQuantity(int maxQuantity) {
115         _maxQuantity = maxQuantity;
116     }
117 
118     public double getPrice() {
119         return _price;
120     }
121 
122     public void setPrice(double price) {
123         _price = price;
124     }
125 
126     public double getDiscount() {
127         return _discount;
128     }
129 
130     public void setDiscount(double discount) {
131         _discount = discount;
132     }
133 
134     public boolean getTaxable() {
135         return _taxable;
136     }
137 
138     public boolean isTaxable() {
139         return _taxable;
140     }
141 
142     public void setTaxable(boolean taxable) {
143         _taxable = taxable;
144     }
145 
146     public double getShipping() {
147         return _shipping;
148     }
149 
150     public void setShipping(double shipping) {
151         _shipping = shipping;
152     }
153 
154     public boolean getUseShippingFormula() {
155         return _useShippingFormula;
156     }
157 
158     public boolean isUseShippingFormula() {
159         return _useShippingFormula;
160     }
161 
162     public void setUseShippingFormula(boolean useShippingFormula) {
163         _useShippingFormula = useShippingFormula;
164     }
165 
166     public int getStatus() {
167         return _status;
168     }
169 
170     public void setStatus(int status) {
171         _status = status;
172     }
173 
174     private long _itemPriceId;
175     private long _itemId;
176     private int _minQuantity;
177     private int _maxQuantity;
178     private double _price;
179     private double _discount;
180     private boolean _taxable;
181     private double _shipping;
182     private boolean _useShippingFormula;
183     private int _status;
184 }