001
014
015 package com.liferay.portlet.shopping.model;
016
017 import com.liferay.portal.model.ModelWrapper;
018
019 import java.util.HashMap;
020 import java.util.Map;
021
022
031 public class ShoppingItemPriceWrapper implements ShoppingItemPrice,
032 ModelWrapper<ShoppingItemPrice> {
033 public ShoppingItemPriceWrapper(ShoppingItemPrice shoppingItemPrice) {
034 _shoppingItemPrice = shoppingItemPrice;
035 }
036
037 public Class<?> getModelClass() {
038 return ShoppingItemPrice.class;
039 }
040
041 public String getModelClassName() {
042 return ShoppingItemPrice.class.getName();
043 }
044
045 public Map<String, Object> getModelAttributes() {
046 Map<String, Object> attributes = new HashMap<String, Object>();
047
048 attributes.put("itemPriceId", getItemPriceId());
049 attributes.put("itemId", getItemId());
050 attributes.put("minQuantity", getMinQuantity());
051 attributes.put("maxQuantity", getMaxQuantity());
052 attributes.put("price", getPrice());
053 attributes.put("discount", getDiscount());
054 attributes.put("taxable", getTaxable());
055 attributes.put("shipping", getShipping());
056 attributes.put("useShippingFormula", getUseShippingFormula());
057 attributes.put("status", getStatus());
058
059 return attributes;
060 }
061
062 public void setModelAttributes(Map<String, Object> attributes) {
063 Long itemPriceId = (Long)attributes.get("itemPriceId");
064
065 if (itemPriceId != null) {
066 setItemPriceId(itemPriceId);
067 }
068
069 Long itemId = (Long)attributes.get("itemId");
070
071 if (itemId != null) {
072 setItemId(itemId);
073 }
074
075 Integer minQuantity = (Integer)attributes.get("minQuantity");
076
077 if (minQuantity != null) {
078 setMinQuantity(minQuantity);
079 }
080
081 Integer maxQuantity = (Integer)attributes.get("maxQuantity");
082
083 if (maxQuantity != null) {
084 setMaxQuantity(maxQuantity);
085 }
086
087 Double price = (Double)attributes.get("price");
088
089 if (price != null) {
090 setPrice(price);
091 }
092
093 Double discount = (Double)attributes.get("discount");
094
095 if (discount != null) {
096 setDiscount(discount);
097 }
098
099 Boolean taxable = (Boolean)attributes.get("taxable");
100
101 if (taxable != null) {
102 setTaxable(taxable);
103 }
104
105 Double shipping = (Double)attributes.get("shipping");
106
107 if (shipping != null) {
108 setShipping(shipping);
109 }
110
111 Boolean useShippingFormula = (Boolean)attributes.get(
112 "useShippingFormula");
113
114 if (useShippingFormula != null) {
115 setUseShippingFormula(useShippingFormula);
116 }
117
118 Integer status = (Integer)attributes.get("status");
119
120 if (status != null) {
121 setStatus(status);
122 }
123 }
124
125
130 public long getPrimaryKey() {
131 return _shoppingItemPrice.getPrimaryKey();
132 }
133
134
139 public void setPrimaryKey(long primaryKey) {
140 _shoppingItemPrice.setPrimaryKey(primaryKey);
141 }
142
143
148 public long getItemPriceId() {
149 return _shoppingItemPrice.getItemPriceId();
150 }
151
152
157 public void setItemPriceId(long itemPriceId) {
158 _shoppingItemPrice.setItemPriceId(itemPriceId);
159 }
160
161
166 public long getItemId() {
167 return _shoppingItemPrice.getItemId();
168 }
169
170
175 public void setItemId(long itemId) {
176 _shoppingItemPrice.setItemId(itemId);
177 }
178
179
184 public int getMinQuantity() {
185 return _shoppingItemPrice.getMinQuantity();
186 }
187
188
193 public void setMinQuantity(int minQuantity) {
194 _shoppingItemPrice.setMinQuantity(minQuantity);
195 }
196
197
202 public int getMaxQuantity() {
203 return _shoppingItemPrice.getMaxQuantity();
204 }
205
206
211 public void setMaxQuantity(int maxQuantity) {
212 _shoppingItemPrice.setMaxQuantity(maxQuantity);
213 }
214
215
220 public double getPrice() {
221 return _shoppingItemPrice.getPrice();
222 }
223
224
229 public void setPrice(double price) {
230 _shoppingItemPrice.setPrice(price);
231 }
232
233
238 public double getDiscount() {
239 return _shoppingItemPrice.getDiscount();
240 }
241
242
247 public void setDiscount(double discount) {
248 _shoppingItemPrice.setDiscount(discount);
249 }
250
251
256 public boolean getTaxable() {
257 return _shoppingItemPrice.getTaxable();
258 }
259
260
265 public boolean isTaxable() {
266 return _shoppingItemPrice.isTaxable();
267 }
268
269
274 public void setTaxable(boolean taxable) {
275 _shoppingItemPrice.setTaxable(taxable);
276 }
277
278
283 public double getShipping() {
284 return _shoppingItemPrice.getShipping();
285 }
286
287
292 public void setShipping(double shipping) {
293 _shoppingItemPrice.setShipping(shipping);
294 }
295
296
301 public boolean getUseShippingFormula() {
302 return _shoppingItemPrice.getUseShippingFormula();
303 }
304
305
310 public boolean isUseShippingFormula() {
311 return _shoppingItemPrice.isUseShippingFormula();
312 }
313
314
319 public void setUseShippingFormula(boolean useShippingFormula) {
320 _shoppingItemPrice.setUseShippingFormula(useShippingFormula);
321 }
322
323
328 public int getStatus() {
329 return _shoppingItemPrice.getStatus();
330 }
331
332
337 public void setStatus(int status) {
338 _shoppingItemPrice.setStatus(status);
339 }
340
341 public boolean isNew() {
342 return _shoppingItemPrice.isNew();
343 }
344
345 public void setNew(boolean n) {
346 _shoppingItemPrice.setNew(n);
347 }
348
349 public boolean isCachedModel() {
350 return _shoppingItemPrice.isCachedModel();
351 }
352
353 public void setCachedModel(boolean cachedModel) {
354 _shoppingItemPrice.setCachedModel(cachedModel);
355 }
356
357 public boolean isEscapedModel() {
358 return _shoppingItemPrice.isEscapedModel();
359 }
360
361 public java.io.Serializable getPrimaryKeyObj() {
362 return _shoppingItemPrice.getPrimaryKeyObj();
363 }
364
365 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
366 _shoppingItemPrice.setPrimaryKeyObj(primaryKeyObj);
367 }
368
369 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
370 return _shoppingItemPrice.getExpandoBridge();
371 }
372
373 public void setExpandoBridgeAttributes(
374 com.liferay.portal.model.BaseModel<?> baseModel) {
375 _shoppingItemPrice.setExpandoBridgeAttributes(baseModel);
376 }
377
378 public void setExpandoBridgeAttributes(
379 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
380 _shoppingItemPrice.setExpandoBridgeAttributes(expandoBridge);
381 }
382
383 public void setExpandoBridgeAttributes(
384 com.liferay.portal.service.ServiceContext serviceContext) {
385 _shoppingItemPrice.setExpandoBridgeAttributes(serviceContext);
386 }
387
388 @Override
389 public java.lang.Object clone() {
390 return new ShoppingItemPriceWrapper((ShoppingItemPrice)_shoppingItemPrice.clone());
391 }
392
393 public int compareTo(
394 com.liferay.portlet.shopping.model.ShoppingItemPrice shoppingItemPrice) {
395 return _shoppingItemPrice.compareTo(shoppingItemPrice);
396 }
397
398 @Override
399 public int hashCode() {
400 return _shoppingItemPrice.hashCode();
401 }
402
403 public com.liferay.portal.model.CacheModel<com.liferay.portlet.shopping.model.ShoppingItemPrice> toCacheModel() {
404 return _shoppingItemPrice.toCacheModel();
405 }
406
407 public com.liferay.portlet.shopping.model.ShoppingItemPrice toEscapedModel() {
408 return new ShoppingItemPriceWrapper(_shoppingItemPrice.toEscapedModel());
409 }
410
411 public com.liferay.portlet.shopping.model.ShoppingItemPrice toUnescapedModel() {
412 return new ShoppingItemPriceWrapper(_shoppingItemPrice.toUnescapedModel());
413 }
414
415 @Override
416 public java.lang.String toString() {
417 return _shoppingItemPrice.toString();
418 }
419
420 public java.lang.String toXmlString() {
421 return _shoppingItemPrice.toXmlString();
422 }
423
424 public void persist()
425 throws com.liferay.portal.kernel.exception.SystemException {
426 _shoppingItemPrice.persist();
427 }
428
429
432 public ShoppingItemPrice getWrappedShoppingItemPrice() {
433 return _shoppingItemPrice;
434 }
435
436 public ShoppingItemPrice getWrappedModel() {
437 return _shoppingItemPrice;
438 }
439
440 public void resetOriginalValues() {
441 _shoppingItemPrice.resetOriginalValues();
442 }
443
444 private ShoppingItemPrice _shoppingItemPrice;
445 }