19 package org.turro.financials.cart;
21 import java.io.Serializable;
22 import org.turro.financials.db.FinancialsPU;
23 import org.turro.financials.entity.Product;
24 import org.turro.math.Round;
25 import org.turro.util.CompareUtil;
31 public class CartItem implements Serializable, Comparable<CartItem> {
34 private long productId;
35 private double quantity, tax, price;
36 private boolean needsDelivery, deliveryItem, needsConcept;
37 private String concept;
52 this.productId = productId;
60 this.quantity = Math.round(quantity);
84 this.concept = concept;
96 this.deliveryItem = deliveryItem;
124 if(quantity == 0.0) {
138 private transient Product product;
142 if(product ==
null || productId != product.
getId()) {
void setProductId(long productId)
void setQuantity(double quantity)
void setConcept(String concept)
void setDeliveryItem(boolean deliveryItem)
boolean isNeedsDelivery()
void setPrice(double price)
int compareTo(CartItem o)
Round decimals(int digits)