@Named public class ProductCatalogDAO extends Object implements ProductCatalog
Modifier and Type | Field and Description |
---|---|
private EntityManager |
em |
Constructor and Description |
---|
ProductCatalogDAO() |
Modifier and Type | Method and Description |
---|---|
Product |
addProduct(Product product) |
List<Product> |
getBuyerProducts(Member buyer,
int offset,
int limit) |
List<Product> |
getProductsForSale(Product template,
int offset,
int limit) |
List<Product> |
getSellerProducts(Member seller,
int offset,
int limit) |
int |
remove(Product product) |
@Inject private EntityManager em
public Product addProduct(Product product)
addProduct
in interface ProductCatalog
public List<Product> getProductsForSale(Product template, int offset, int limit)
getProductsForSale
in interface ProductCatalog
public List<Product> getBuyerProducts(Member buyer, int offset, int limit)
getBuyerProducts
in interface ProductCatalog
public List<Product> getSellerProducts(Member seller, int offset, int limit)
getSellerProducts
in interface ProductCatalog
public int remove(Product product)
remove
in interface ProductCatalog
Copyright © 2015 John's Hopkins University, Engineering Programs for Professionals. All rights reserved.