001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.shopping.model;
016    
017    import java.io.Serializable;
018    
019    import java.util.ArrayList;
020    import java.util.List;
021    
022    /**
023     * This class is used by SOAP remote services.
024     *
025     * @author Brian Wing Shun Chan
026     * @generated
027     */
028    public class ShoppingItemPriceSoap implements Serializable {
029            public static ShoppingItemPriceSoap toSoapModel(ShoppingItemPrice model) {
030                    ShoppingItemPriceSoap soapModel = new ShoppingItemPriceSoap();
031    
032                    soapModel.setItemPriceId(model.getItemPriceId());
033                    soapModel.setItemId(model.getItemId());
034                    soapModel.setMinQuantity(model.getMinQuantity());
035                    soapModel.setMaxQuantity(model.getMaxQuantity());
036                    soapModel.setPrice(model.getPrice());
037                    soapModel.setDiscount(model.getDiscount());
038                    soapModel.setTaxable(model.getTaxable());
039                    soapModel.setShipping(model.getShipping());
040                    soapModel.setUseShippingFormula(model.getUseShippingFormula());
041                    soapModel.setStatus(model.getStatus());
042    
043                    return soapModel;
044            }
045    
046            public static ShoppingItemPriceSoap[] toSoapModels(
047                    ShoppingItemPrice[] models) {
048                    ShoppingItemPriceSoap[] soapModels = new ShoppingItemPriceSoap[models.length];
049    
050                    for (int i = 0; i < models.length; i++) {
051                            soapModels[i] = toSoapModel(models[i]);
052                    }
053    
054                    return soapModels;
055            }
056    
057            public static ShoppingItemPriceSoap[][] toSoapModels(
058                    ShoppingItemPrice[][] models) {
059                    ShoppingItemPriceSoap[][] soapModels = null;
060    
061                    if (models.length > 0) {
062                            soapModels = new ShoppingItemPriceSoap[models.length][models[0].length];
063                    }
064                    else {
065                            soapModels = new ShoppingItemPriceSoap[0][0];
066                    }
067    
068                    for (int i = 0; i < models.length; i++) {
069                            soapModels[i] = toSoapModels(models[i]);
070                    }
071    
072                    return soapModels;
073            }
074    
075            public static ShoppingItemPriceSoap[] toSoapModels(
076                    List<ShoppingItemPrice> models) {
077                    List<ShoppingItemPriceSoap> soapModels = new ArrayList<ShoppingItemPriceSoap>(models.size());
078    
079                    for (ShoppingItemPrice model : models) {
080                            soapModels.add(toSoapModel(model));
081                    }
082    
083                    return soapModels.toArray(new ShoppingItemPriceSoap[soapModels.size()]);
084            }
085    
086            public ShoppingItemPriceSoap() {
087            }
088    
089            public long getPrimaryKey() {
090                    return _itemPriceId;
091            }
092    
093            public void setPrimaryKey(long pk) {
094                    setItemPriceId(pk);
095            }
096    
097            public long getItemPriceId() {
098                    return _itemPriceId;
099            }
100    
101            public void setItemPriceId(long itemPriceId) {
102                    _itemPriceId = itemPriceId;
103            }
104    
105            public long getItemId() {
106                    return _itemId;
107            }
108    
109            public void setItemId(long itemId) {
110                    _itemId = itemId;
111            }
112    
113            public int getMinQuantity() {
114                    return _minQuantity;
115            }
116    
117            public void setMinQuantity(int minQuantity) {
118                    _minQuantity = minQuantity;
119            }
120    
121            public int getMaxQuantity() {
122                    return _maxQuantity;
123            }
124    
125            public void setMaxQuantity(int maxQuantity) {
126                    _maxQuantity = maxQuantity;
127            }
128    
129            public double getPrice() {
130                    return _price;
131            }
132    
133            public void setPrice(double price) {
134                    _price = price;
135            }
136    
137            public double getDiscount() {
138                    return _discount;
139            }
140    
141            public void setDiscount(double discount) {
142                    _discount = discount;
143            }
144    
145            public boolean getTaxable() {
146                    return _taxable;
147            }
148    
149            public boolean isTaxable() {
150                    return _taxable;
151            }
152    
153            public void setTaxable(boolean taxable) {
154                    _taxable = taxable;
155            }
156    
157            public double getShipping() {
158                    return _shipping;
159            }
160    
161            public void setShipping(double shipping) {
162                    _shipping = shipping;
163            }
164    
165            public boolean getUseShippingFormula() {
166                    return _useShippingFormula;
167            }
168    
169            public boolean isUseShippingFormula() {
170                    return _useShippingFormula;
171            }
172    
173            public void setUseShippingFormula(boolean useShippingFormula) {
174                    _useShippingFormula = useShippingFormula;
175            }
176    
177            public int getStatus() {
178                    return _status;
179            }
180    
181            public void setStatus(int status) {
182                    _status = status;
183            }
184    
185            private long _itemPriceId;
186            private long _itemId;
187            private int _minQuantity;
188            private int _maxQuantity;
189            private double _price;
190            private double _discount;
191            private boolean _taxable;
192            private double _shipping;
193            private boolean _useShippingFormula;
194            private int _status;
195    }