001
014
015 package com.liferay.portlet.shopping.model;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.util.Validator;
020 import com.liferay.portal.model.ModelWrapper;
021
022 import java.util.HashMap;
023 import java.util.Map;
024
025
034 @ProviderType
035 public class ShoppingItemPriceWrapper implements ShoppingItemPrice,
036 ModelWrapper<ShoppingItemPrice> {
037 public ShoppingItemPriceWrapper(ShoppingItemPrice shoppingItemPrice) {
038 _shoppingItemPrice = shoppingItemPrice;
039 }
040
041 @Override
042 public Class<?> getModelClass() {
043 return ShoppingItemPrice.class;
044 }
045
046 @Override
047 public String getModelClassName() {
048 return ShoppingItemPrice.class.getName();
049 }
050
051 @Override
052 public Map<String, Object> getModelAttributes() {
053 Map<String, Object> attributes = new HashMap<String, Object>();
054
055 attributes.put("itemPriceId", getItemPriceId());
056 attributes.put("itemId", getItemId());
057 attributes.put("minQuantity", getMinQuantity());
058 attributes.put("maxQuantity", getMaxQuantity());
059 attributes.put("price", getPrice());
060 attributes.put("discount", getDiscount());
061 attributes.put("taxable", getTaxable());
062 attributes.put("shipping", getShipping());
063 attributes.put("useShippingFormula", getUseShippingFormula());
064 attributes.put("status", getStatus());
065
066 return attributes;
067 }
068
069 @Override
070 public void setModelAttributes(Map<String, Object> attributes) {
071 Long itemPriceId = (Long)attributes.get("itemPriceId");
072
073 if (itemPriceId != null) {
074 setItemPriceId(itemPriceId);
075 }
076
077 Long itemId = (Long)attributes.get("itemId");
078
079 if (itemId != null) {
080 setItemId(itemId);
081 }
082
083 Integer minQuantity = (Integer)attributes.get("minQuantity");
084
085 if (minQuantity != null) {
086 setMinQuantity(minQuantity);
087 }
088
089 Integer maxQuantity = (Integer)attributes.get("maxQuantity");
090
091 if (maxQuantity != null) {
092 setMaxQuantity(maxQuantity);
093 }
094
095 Double price = (Double)attributes.get("price");
096
097 if (price != null) {
098 setPrice(price);
099 }
100
101 Double discount = (Double)attributes.get("discount");
102
103 if (discount != null) {
104 setDiscount(discount);
105 }
106
107 Boolean taxable = (Boolean)attributes.get("taxable");
108
109 if (taxable != null) {
110 setTaxable(taxable);
111 }
112
113 Double shipping = (Double)attributes.get("shipping");
114
115 if (shipping != null) {
116 setShipping(shipping);
117 }
118
119 Boolean useShippingFormula = (Boolean)attributes.get(
120 "useShippingFormula");
121
122 if (useShippingFormula != null) {
123 setUseShippingFormula(useShippingFormula);
124 }
125
126 Integer status = (Integer)attributes.get("status");
127
128 if (status != null) {
129 setStatus(status);
130 }
131 }
132
133 @Override
134 public java.lang.Object clone() {
135 return new ShoppingItemPriceWrapper((ShoppingItemPrice)_shoppingItemPrice.clone());
136 }
137
138 @Override
139 public int compareTo(
140 com.liferay.portlet.shopping.model.ShoppingItemPrice shoppingItemPrice) {
141 return _shoppingItemPrice.compareTo(shoppingItemPrice);
142 }
143
144
149 @Override
150 public double getDiscount() {
151 return _shoppingItemPrice.getDiscount();
152 }
153
154 @Override
155 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
156 return _shoppingItemPrice.getExpandoBridge();
157 }
158
159
164 @Override
165 public long getItemId() {
166 return _shoppingItemPrice.getItemId();
167 }
168
169
174 @Override
175 public long getItemPriceId() {
176 return _shoppingItemPrice.getItemPriceId();
177 }
178
179
184 @Override
185 public int getMaxQuantity() {
186 return _shoppingItemPrice.getMaxQuantity();
187 }
188
189
194 @Override
195 public int getMinQuantity() {
196 return _shoppingItemPrice.getMinQuantity();
197 }
198
199
204 @Override
205 public double getPrice() {
206 return _shoppingItemPrice.getPrice();
207 }
208
209
214 @Override
215 public long getPrimaryKey() {
216 return _shoppingItemPrice.getPrimaryKey();
217 }
218
219 @Override
220 public java.io.Serializable getPrimaryKeyObj() {
221 return _shoppingItemPrice.getPrimaryKeyObj();
222 }
223
224
229 @Override
230 public double getShipping() {
231 return _shoppingItemPrice.getShipping();
232 }
233
234
239 @Override
240 public int getStatus() {
241 return _shoppingItemPrice.getStatus();
242 }
243
244
249 @Override
250 public boolean getTaxable() {
251 return _shoppingItemPrice.getTaxable();
252 }
253
254
259 @Override
260 public boolean getUseShippingFormula() {
261 return _shoppingItemPrice.getUseShippingFormula();
262 }
263
264 @Override
265 public int hashCode() {
266 return _shoppingItemPrice.hashCode();
267 }
268
269 @Override
270 public boolean isCachedModel() {
271 return _shoppingItemPrice.isCachedModel();
272 }
273
274 @Override
275 public boolean isEscapedModel() {
276 return _shoppingItemPrice.isEscapedModel();
277 }
278
279 @Override
280 public boolean isNew() {
281 return _shoppingItemPrice.isNew();
282 }
283
284
289 @Override
290 public boolean isTaxable() {
291 return _shoppingItemPrice.isTaxable();
292 }
293
294
299 @Override
300 public boolean isUseShippingFormula() {
301 return _shoppingItemPrice.isUseShippingFormula();
302 }
303
304 @Override
305 public void persist() {
306 _shoppingItemPrice.persist();
307 }
308
309 @Override
310 public void setCachedModel(boolean cachedModel) {
311 _shoppingItemPrice.setCachedModel(cachedModel);
312 }
313
314
319 @Override
320 public void setDiscount(double discount) {
321 _shoppingItemPrice.setDiscount(discount);
322 }
323
324 @Override
325 public void setExpandoBridgeAttributes(
326 com.liferay.portal.model.BaseModel<?> baseModel) {
327 _shoppingItemPrice.setExpandoBridgeAttributes(baseModel);
328 }
329
330 @Override
331 public void setExpandoBridgeAttributes(
332 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
333 _shoppingItemPrice.setExpandoBridgeAttributes(expandoBridge);
334 }
335
336 @Override
337 public void setExpandoBridgeAttributes(
338 com.liferay.portal.service.ServiceContext serviceContext) {
339 _shoppingItemPrice.setExpandoBridgeAttributes(serviceContext);
340 }
341
342
347 @Override
348 public void setItemId(long itemId) {
349 _shoppingItemPrice.setItemId(itemId);
350 }
351
352
357 @Override
358 public void setItemPriceId(long itemPriceId) {
359 _shoppingItemPrice.setItemPriceId(itemPriceId);
360 }
361
362
367 @Override
368 public void setMaxQuantity(int maxQuantity) {
369 _shoppingItemPrice.setMaxQuantity(maxQuantity);
370 }
371
372
377 @Override
378 public void setMinQuantity(int minQuantity) {
379 _shoppingItemPrice.setMinQuantity(minQuantity);
380 }
381
382 @Override
383 public void setNew(boolean n) {
384 _shoppingItemPrice.setNew(n);
385 }
386
387
392 @Override
393 public void setPrice(double price) {
394 _shoppingItemPrice.setPrice(price);
395 }
396
397
402 @Override
403 public void setPrimaryKey(long primaryKey) {
404 _shoppingItemPrice.setPrimaryKey(primaryKey);
405 }
406
407 @Override
408 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
409 _shoppingItemPrice.setPrimaryKeyObj(primaryKeyObj);
410 }
411
412
417 @Override
418 public void setShipping(double shipping) {
419 _shoppingItemPrice.setShipping(shipping);
420 }
421
422
427 @Override
428 public void setStatus(int status) {
429 _shoppingItemPrice.setStatus(status);
430 }
431
432
437 @Override
438 public void setTaxable(boolean taxable) {
439 _shoppingItemPrice.setTaxable(taxable);
440 }
441
442
447 @Override
448 public void setUseShippingFormula(boolean useShippingFormula) {
449 _shoppingItemPrice.setUseShippingFormula(useShippingFormula);
450 }
451
452 @Override
453 public com.liferay.portal.model.CacheModel<com.liferay.portlet.shopping.model.ShoppingItemPrice> toCacheModel() {
454 return _shoppingItemPrice.toCacheModel();
455 }
456
457 @Override
458 public com.liferay.portlet.shopping.model.ShoppingItemPrice toEscapedModel() {
459 return new ShoppingItemPriceWrapper(_shoppingItemPrice.toEscapedModel());
460 }
461
462 @Override
463 public java.lang.String toString() {
464 return _shoppingItemPrice.toString();
465 }
466
467 @Override
468 public com.liferay.portlet.shopping.model.ShoppingItemPrice toUnescapedModel() {
469 return new ShoppingItemPriceWrapper(_shoppingItemPrice.toUnescapedModel());
470 }
471
472 @Override
473 public java.lang.String toXmlString() {
474 return _shoppingItemPrice.toXmlString();
475 }
476
477 @Override
478 public boolean equals(Object obj) {
479 if (this == obj) {
480 return true;
481 }
482
483 if (!(obj instanceof ShoppingItemPriceWrapper)) {
484 return false;
485 }
486
487 ShoppingItemPriceWrapper shoppingItemPriceWrapper = (ShoppingItemPriceWrapper)obj;
488
489 if (Validator.equals(_shoppingItemPrice,
490 shoppingItemPriceWrapper._shoppingItemPrice)) {
491 return true;
492 }
493
494 return false;
495 }
496
497
500 @Deprecated
501 public ShoppingItemPrice getWrappedShoppingItemPrice() {
502 return _shoppingItemPrice;
503 }
504
505 @Override
506 public ShoppingItemPrice getWrappedModel() {
507 return _shoppingItemPrice;
508 }
509
510 @Override
511 public boolean isEntityCacheEnabled() {
512 return _shoppingItemPrice.isEntityCacheEnabled();
513 }
514
515 @Override
516 public boolean isFinderCacheEnabled() {
517 return _shoppingItemPrice.isFinderCacheEnabled();
518 }
519
520 @Override
521 public void resetOriginalValues() {
522 _shoppingItemPrice.resetOriginalValues();
523 }
524
525 private final ShoppingItemPrice _shoppingItemPrice;
526 }