1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights 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
35   * overwritten the next time is generated.
36   * </p>
37   *
38   * <p>
39   * This class is used by
40   * {@link com.liferay.portlet.shopping.service.http.ShoppingItemPriceServiceSoap}.
41   * </p>
42   *
43   * @author    Brian Wing Shun Chan
44   * @see       com.liferay.portlet.shopping.service.http.ShoppingItemPriceServiceSoap
45   * @generated
46   */
47  public class ShoppingItemPriceSoap implements Serializable {
48      public static ShoppingItemPriceSoap toSoapModel(ShoppingItemPrice model) {
49          ShoppingItemPriceSoap soapModel = new ShoppingItemPriceSoap();
50  
51          soapModel.setItemPriceId(model.getItemPriceId());
52          soapModel.setItemId(model.getItemId());
53          soapModel.setMinQuantity(model.getMinQuantity());
54          soapModel.setMaxQuantity(model.getMaxQuantity());
55          soapModel.setPrice(model.getPrice());
56          soapModel.setDiscount(model.getDiscount());
57          soapModel.setTaxable(model.getTaxable());
58          soapModel.setShipping(model.getShipping());
59          soapModel.setUseShippingFormula(model.getUseShippingFormula());
60          soapModel.setStatus(model.getStatus());
61  
62          return soapModel;
63      }
64  
65      public static ShoppingItemPriceSoap[] toSoapModels(
66          ShoppingItemPrice[] models) {
67          ShoppingItemPriceSoap[] soapModels = new ShoppingItemPriceSoap[models.length];
68  
69          for (int i = 0; i < models.length; i++) {
70              soapModels[i] = toSoapModel(models[i]);
71          }
72  
73          return soapModels;
74      }
75  
76      public static ShoppingItemPriceSoap[][] toSoapModels(
77          ShoppingItemPrice[][] models) {
78          ShoppingItemPriceSoap[][] soapModels = null;
79  
80          if (models.length > 0) {
81              soapModels = new ShoppingItemPriceSoap[models.length][models[0].length];
82          }
83          else {
84              soapModels = new ShoppingItemPriceSoap[0][0];
85          }
86  
87          for (int i = 0; i < models.length; i++) {
88              soapModels[i] = toSoapModels(models[i]);
89          }
90  
91          return soapModels;
92      }
93  
94      public static ShoppingItemPriceSoap[] toSoapModels(
95          List<ShoppingItemPrice> models) {
96          List<ShoppingItemPriceSoap> soapModels = new ArrayList<ShoppingItemPriceSoap>(models.size());
97  
98          for (ShoppingItemPrice model : models) {
99              soapModels.add(toSoapModel(model));
100         }
101 
102         return soapModels.toArray(new ShoppingItemPriceSoap[soapModels.size()]);
103     }
104 
105     public ShoppingItemPriceSoap() {
106     }
107 
108     public long getPrimaryKey() {
109         return _itemPriceId;
110     }
111 
112     public void setPrimaryKey(long pk) {
113         setItemPriceId(pk);
114     }
115 
116     public long getItemPriceId() {
117         return _itemPriceId;
118     }
119 
120     public void setItemPriceId(long itemPriceId) {
121         _itemPriceId = itemPriceId;
122     }
123 
124     public long getItemId() {
125         return _itemId;
126     }
127 
128     public void setItemId(long itemId) {
129         _itemId = itemId;
130     }
131 
132     public int getMinQuantity() {
133         return _minQuantity;
134     }
135 
136     public void setMinQuantity(int minQuantity) {
137         _minQuantity = minQuantity;
138     }
139 
140     public int getMaxQuantity() {
141         return _maxQuantity;
142     }
143 
144     public void setMaxQuantity(int maxQuantity) {
145         _maxQuantity = maxQuantity;
146     }
147 
148     public double getPrice() {
149         return _price;
150     }
151 
152     public void setPrice(double price) {
153         _price = price;
154     }
155 
156     public double getDiscount() {
157         return _discount;
158     }
159 
160     public void setDiscount(double discount) {
161         _discount = discount;
162     }
163 
164     public boolean getTaxable() {
165         return _taxable;
166     }
167 
168     public boolean isTaxable() {
169         return _taxable;
170     }
171 
172     public void setTaxable(boolean taxable) {
173         _taxable = taxable;
174     }
175 
176     public double getShipping() {
177         return _shipping;
178     }
179 
180     public void setShipping(double shipping) {
181         _shipping = shipping;
182     }
183 
184     public boolean getUseShippingFormula() {
185         return _useShippingFormula;
186     }
187 
188     public boolean isUseShippingFormula() {
189         return _useShippingFormula;
190     }
191 
192     public void setUseShippingFormula(boolean useShippingFormula) {
193         _useShippingFormula = useShippingFormula;
194     }
195 
196     public int getStatus() {
197         return _status;
198     }
199 
200     public void setStatus(int status) {
201         _status = status;
202     }
203 
204     private long _itemPriceId;
205     private long _itemId;
206     private int _minQuantity;
207     private int _maxQuantity;
208     private double _price;
209     private double _discount;
210     private boolean _taxable;
211     private double _shipping;
212     private boolean _useShippingFormula;
213     private int _status;
214 }