ShoppingCartBeanpublic class ShoppingCartBean extends Object implements ShoppingCart, Serializable
Fields Summary |
---|
private EntityManager | manager | private Order | order |
Methods Summary |
---|
public void | buy(java.lang.String product, int quantity, double price)
if (order == null) order = new Order();
order.addPurchase(product, quantity, price);
| public void | checkout()
manager.persist(order);
| public Order | getOrder()
return order;
|
|