Package com.ateam.webstore.model

Examples of com.ateam.webstore.model.Cart


*/
public class CartDAO extends GenericDAOImpl<Cart, Serializable> {

  public Cart getByCustomer(Serializable customer) {
   
    Cart cart = null;
   
    try {
      Query query = getPersistenceManager().newQuery(getPersistentClass(), "customer == :customer");
      query.setUnique(true);
      cart = (Cart) query.execute(customer);
View Full Code Here


    }
   
    if (cart == null) {
      l.info("creating cart for session: "+req.getSession().getId());
      Customer cust = v.getCustomer();
      cart = new Cart(cust);
      service.store(cart);
      req.getSession().setAttribute(SESSION_ATTRIBUTE_CART, service.getByCustomerId(cust.getId()));
    }

    l.info("adding product to cart for session: "+req.getSession().getId());
View Full Code Here

TOP

Related Classes of com.ateam.webstore.model.Cart

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.