@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 ProductCatalogpublic List<Product> getProductsForSale(Product template, int offset, int limit)
getProductsForSale in interface ProductCatalogpublic List<Product> getBuyerProducts(Member buyer, int offset, int limit)
getBuyerProducts in interface ProductCatalogpublic List<Product> getSellerProducts(Member seller, int offset, int limit)
getSellerProducts in interface ProductCatalogpublic int remove(Product product)
remove in interface ProductCatalogCopyright © 2015 John's Hopkins University, Engineering Programs for Professionals. All rights reserved.