1
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
48 public class ShoppingItemPriceSoap implements Serializable {
49 public static ShoppingItemPriceSoap toSoapModel(ShoppingItemPrice model) {
50 ShoppingItemPriceSoap soapModel = new ShoppingItemPriceSoap();
51
52 soapModel.setItemPriceId(model.getItemPriceId());
53 soapModel.setItemId(model.getItemId());
54 soapModel.setMinQuantity(model.getMinQuantity());
55 soapModel.setMaxQuantity(model.getMaxQuantity());
56 soapModel.setPrice(model.getPrice());
57 soapModel.setDiscount(model.getDiscount());
58 soapModel.setTaxable(model.getTaxable());
59 soapModel.setShipping(model.getShipping());
60 soapModel.setUseShippingFormula(model.getUseShippingFormula());
61 soapModel.setStatus(model.getStatus());
62
63 return soapModel;
64 }
65
66 public static ShoppingItemPriceSoap[] toSoapModels(
67 ShoppingItemPrice[] models) {
68 ShoppingItemPriceSoap[] soapModels = new ShoppingItemPriceSoap[models.length];
69
70 for (int i = 0; i < models.length; i++) {
71 soapModels[i] = toSoapModel(models[i]);
72 }
73
74 return soapModels;
75 }
76
77 public static ShoppingItemPriceSoap[][] toSoapModels(
78 ShoppingItemPrice[][] models) {
79 ShoppingItemPriceSoap[][] soapModels = null;
80
81 if (models.length > 0) {
82 soapModels = new ShoppingItemPriceSoap[models.length][models[0].length];
83 }
84 else {
85 soapModels = new ShoppingItemPriceSoap[0][0];
86 }
87
88 for (int i = 0; i < models.length; i++) {
89 soapModels[i] = toSoapModels(models[i]);
90 }
91
92 return soapModels;
93 }
94
95 public static ShoppingItemPriceSoap[] toSoapModels(
96 List<ShoppingItemPrice> models) {
97 List<ShoppingItemPriceSoap> soapModels = new ArrayList<ShoppingItemPriceSoap>(models.size());
98
99 for (ShoppingItemPrice model : models) {
100 soapModels.add(toSoapModel(model));
101 }
102
103 return soapModels.toArray(new ShoppingItemPriceSoap[soapModels.size()]);
104 }
105
106 public ShoppingItemPriceSoap() {
107 }
108
109 public long getPrimaryKey() {
110 return _itemPriceId;
111 }
112
113 public void setPrimaryKey(long pk) {
114 setItemPriceId(pk);
115 }
116
117 public long getItemPriceId() {
118 return _itemPriceId;
119 }
120
121 public void setItemPriceId(long itemPriceId) {
122 _itemPriceId = itemPriceId;
123 }
124
125 public long getItemId() {
126 return _itemId;
127 }
128
129 public void setItemId(long itemId) {
130 _itemId = itemId;
131 }
132
133 public int getMinQuantity() {
134 return _minQuantity;
135 }
136
137 public void setMinQuantity(int minQuantity) {
138 _minQuantity = minQuantity;
139 }
140
141 public int getMaxQuantity() {
142 return _maxQuantity;
143 }
144
145 public void setMaxQuantity(int maxQuantity) {
146 _maxQuantity = maxQuantity;
147 }
148
149 public double getPrice() {
150 return _price;
151 }
152
153 public void setPrice(double price) {
154 _price = price;
155 }
156
157 public double getDiscount() {
158 return _discount;
159 }
160
161 public void setDiscount(double discount) {
162 _discount = discount;
163 }
164
165 public boolean getTaxable() {
166 return _taxable;
167 }
168
169 public boolean isTaxable() {
170 return _taxable;
171 }
172
173 public void setTaxable(boolean taxable) {
174 _taxable = taxable;
175 }
176
177 public double getShipping() {
178 return _shipping;
179 }
180
181 public void setShipping(double shipping) {
182 _shipping = shipping;
183 }
184
185 public boolean getUseShippingFormula() {
186 return _useShippingFormula;
187 }
188
189 public boolean isUseShippingFormula() {
190 return _useShippingFormula;
191 }
192
193 public void setUseShippingFormula(boolean useShippingFormula) {
194 _useShippingFormula = useShippingFormula;
195 }
196
197 public int getStatus() {
198 return _status;
199 }
200
201 public void setStatus(int status) {
202 _status = status;
203 }
204
205 private long _itemPriceId;
206 private long _itemId;
207 private int _minQuantity;
208 private int _maxQuantity;
209 private double _price;
210 private double _discount;
211 private boolean _taxable;
212 private double _shipping;
213 private boolean _useShippingFormula;
214 private int _status;
215 }