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