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          List<ShoppingItemPrice> models) {
65          List<ShoppingItemPriceSoap> soapModels = new ArrayList<ShoppingItemPriceSoap>(models.size());
66  
67          for (ShoppingItemPrice model : models) {
68              soapModels.add(toSoapModel(model));
69          }
70  
71          return soapModels.toArray(new ShoppingItemPriceSoap[soapModels.size()]);
72      }
73  
74      public ShoppingItemPriceSoap() {
75      }
76  
77      public long getPrimaryKey() {
78          return _itemPriceId;
79      }
80  
81      public void setPrimaryKey(long pk) {
82          setItemPriceId(pk);
83      }
84  
85      public long getItemPriceId() {
86          return _itemPriceId;
87      }
88  
89      public void setItemPriceId(long itemPriceId) {
90          _itemPriceId = itemPriceId;
91      }
92  
93      public long getItemId() {
94          return _itemId;
95      }
96  
97      public void setItemId(long itemId) {
98          _itemId = itemId;
99      }
100 
101     public int getMinQuantity() {
102         return _minQuantity;
103     }
104 
105     public void setMinQuantity(int minQuantity) {
106         _minQuantity = minQuantity;
107     }
108 
109     public int getMaxQuantity() {
110         return _maxQuantity;
111     }
112 
113     public void setMaxQuantity(int maxQuantity) {
114         _maxQuantity = maxQuantity;
115     }
116 
117     public double getPrice() {
118         return _price;
119     }
120 
121     public void setPrice(double price) {
122         _price = price;
123     }
124 
125     public double getDiscount() {
126         return _discount;
127     }
128 
129     public void setDiscount(double discount) {
130         _discount = discount;
131     }
132 
133     public boolean getTaxable() {
134         return _taxable;
135     }
136 
137     public boolean isTaxable() {
138         return _taxable;
139     }
140 
141     public void setTaxable(boolean taxable) {
142         _taxable = taxable;
143     }
144 
145     public double getShipping() {
146         return _shipping;
147     }
148 
149     public void setShipping(double shipping) {
150         _shipping = shipping;
151     }
152 
153     public boolean getUseShippingFormula() {
154         return _useShippingFormula;
155     }
156 
157     public boolean isUseShippingFormula() {
158         return _useShippingFormula;
159     }
160 
161     public void setUseShippingFormula(boolean useShippingFormula) {
162         _useShippingFormula = useShippingFormula;
163     }
164 
165     public int getStatus() {
166         return _status;
167     }
168 
169     public void setStatus(int status) {
170         _status = status;
171     }
172 
173     private long _itemPriceId;
174     private long _itemId;
175     private int _minQuantity;
176     private int _maxQuantity;
177     private double _price;
178     private double _discount;
179     private boolean _taxable;
180     private double _shipping;
181     private boolean _useShippingFormula;
182     private int _status;
183 }