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