
package olstore.session;

public interface ShoppingCart {

   public olstore.entity.UserLocal getUser(  ) ;
   public void setUser( olstore.entity.UserLocal user) ;
   
   public java.lang.Integer getQuantity( java.lang.Integer itemPK ) ;

   /**
    * Remove one item from the cart
    * @param itemPK
    */
   public void removeItemFromCart( java.lang.Integer itemPK ) ;

   /**
    * Update the quantity of an item in the cart
    * @param itemPK
    * @param quantity
    */
   public void updateQuantity( java.lang.Integer itemPK,java.lang.Integer quantity ) ;

   /**
    * Returns whether or not hte item is in the shopping cart
    * @param itemPK
    * @return whether or not the item is in the shopping cart
    */
   public boolean contains( java.lang.Integer itemPK ) ;

   /**
    * Returns the total number of items in the cart
    * @return total number of items in the cart
    */
   public java.lang.Integer listNumOfItems(  ) ;

   /**
    * Returns the total cost of items in the cart
    * @return total cost of items in the cart
    */
   public java.math.BigDecimal getTotalCost(  ) ;

   /**
    * Returns the items in the cart
    * @return the items in the cart
    */
   public java.util.Collection getItemsInCart(  ) ;

   /**
    * Crate orders from the items in the cart
    */
   public void createOrders(  ) ;

   public java.util.ArrayList shoppingCartToDTOs(  ) ;

   /**
    * Takes updated information from the form and transfers to the Shopping Cart.
    * @param cartEntries
    */
   public void DTOsToShoppingCart( java.util.ArrayList cartEntries ) ;

   public java.math.BigDecimal getCostForItem( java.lang.Integer itemPK ) ;

}
