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