FileDocCategorySizeDatePackage
ShoppingCartBean.javaAPI DocJBoss 4.2.11788Fri Jul 13 20:55:24 BST 2007org.jboss.tutorial.entity.bean

ShoppingCartBean

public class ShoppingCartBean extends Object implements ShoppingCart, Serializable

Fields Summary
private EntityManager
manager
private Order
order
Constructors Summary
Methods Summary
public voidbuy(java.lang.String product, int quantity, double price)

      if (order == null) order = new Order();
      order.addPurchase(product, quantity, price);
   
public voidcheckout()

      manager.persist(order);
   
public OrdergetOrder()

      return order;