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