1 package org.apache.tapestry.pets.domain.model.pojo; 2 3 import java.io.Serializable ; 4 import java.math.BigDecimal ; 5 6 import org.apache.tapestry.pets.domain.model.IBasketItem; 7 8 11 public class BasketItem implements IBasketItem,Serializable 12 { 13 private String itemID; 15 private String name; 16 private int qty; 17 private BigDecimal price; 18 private double total; 19 private boolean inStock; 20 21 30 public BasketItem(String itemID, String name, boolean inStock, int qty, BigDecimal price) 31 { 32 this.setItemID(itemID); 34 this.setName(name); 35 this.setQty(qty); 36 this.setPrice(price); 37 this.setTotal(total); 38 this.setInStock(inStock); 39 } 40 41 public void setItemID(String itemID) 42 { 43 this.itemID = itemID; 44 } 45 46 public String getItemID() 47 { 48 return itemID; 49 } 50 51 public void setName(String name) 52 { 53 this.name = name; 54 } 55 56 public String getName() 57 { 58 return name; 59 } 60 61 public void setQty(int qty) 62 { 63 this.qty = qty; 64 } 65 66 public int getQty() 67 { 68 return qty; 69 } 70 71 public void setPrice(BigDecimal price) 72 { 73 this.price = price; 74 } 75 76 public BigDecimal getPrice() 77 { 78 return price; 79 } 80 81 public void setTotal(double total) 82 { 83 this.total = total; 84 } 85 86 public double getTotal() 87 { 88 return total; 89 } 90 91 public void setInStock(boolean inStock) 92 { 93 this.inStock = inStock; 94 } 95 96 public boolean getInStock() 97 { 98 return inStock; 99 } 100 } 101 | Popular Tags |