Package com.ateam.webstore.dao

Examples of com.ateam.webstore.dao.CartDAO


public class CartService implements RepositoryService<Cart> {

  @Override
  public Cart store(Cart cart) {
   
    CartDAO repository = new CartDAO();
    return repository.save(cart);
   
  }
View Full Code Here


  }

  @Override
  public void remove(Cart cart) {
   
    CartDAO repository = new CartDAO();
    repository.delete(cart);
   
  }
View Full Code Here

  }

  @Override
  public Collection<Cart> getAll() {

    CartDAO repository = new CartDAO();
    return repository.getAll();
   
  }
View Full Code Here

   
  }

  @Override
  public Cart getById(Serializable id) {
    CartDAO repository = new CartDAO();
    return repository.get(id);
  }
View Full Code Here

  }
 
  public Cart getByCustomerId(Serializable customerID) {
   
    Customer customer = new CustomerService().getById(customerID);   
    CartDAO repository = new CartDAO();
    return repository.getByCustomer(customer);
  }
View Full Code Here

TOP

Related Classes of com.ateam.webstore.dao.CartDAO

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.