Package com.ateam.webstore.service.impl

Source Code of com.ateam.webstore.service.impl.ProductsInCartService

/**
*
*/
package com.ateam.webstore.service.impl;

import java.io.Serializable;
import java.util.Collection;

import com.ateam.webstore.dao.ProductsInCartDAO;
import com.ateam.webstore.model.ProductsInCart;
import com.ateam.webstore.service.RepositoryService;

/**
* @author Hendrix Tavarez
*
*/
public class ProductsInCartService implements RepositoryService<ProductsInCart> {

  @Override
  public ProductsInCart store(ProductsInCart productsInCart) {
   
    ProductsInCartDAO repository = new ProductsInCartDAO();
    return repository.save(productsInCart);
  }

  @Override
  public void remove(ProductsInCart productsInCart) {
   
    ProductsInCartDAO repository = new ProductsInCartDAO();
    repository.delete(productsInCart);
   
  }

  @Override
  public Collection<ProductsInCart> getAll() {

    ProductsInCartDAO repository = new ProductsInCartDAO();
    return repository.getAll();
  }

  @Override
  public ProductsInCart getById(Serializable id) {
    ProductsInCartDAO repository = new ProductsInCartDAO();
    return repository.get(id);
  }

}
TOP

Related Classes of com.ateam.webstore.service.impl.ProductsInCartService

TOP
Copyright © 2018 www.massapi.com. 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.