Class ProductCatalogDAO
- java.lang.Object
-
- info.ejava.examples.ejb.cdisales.dao.ProductCatalogDAO
-
- All Implemented Interfaces:
ProductCatalog
@Named public class ProductCatalogDAO extends Object implements ProductCatalog
-
-
Field Summary
Fields Modifier and Type Field Description private EntityManagerem
-
Constructor Summary
Constructors Constructor Description ProductCatalogDAO()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProductaddProduct(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)intremove(Product product)
-
-
-
Field Detail
-
em
@Inject private EntityManager em
-
-
Method Detail
-
addProduct
public Product addProduct(Product product)
- Specified by:
addProductin interfaceProductCatalog
-
getProductsForSale
public List<Product> getProductsForSale(Product template, int offset, int limit)
- Specified by:
getProductsForSalein interfaceProductCatalog
-
getBuyerProducts
public List<Product> getBuyerProducts(Member buyer, int offset, int limit)
- Specified by:
getBuyerProductsin interfaceProductCatalog
-
getSellerProducts
public List<Product> getSellerProducts(Member seller, int offset, int limit)
- Specified by:
getSellerProductsin interfaceProductCatalog
-
remove
public int remove(Product product)
- Specified by:
removein interfaceProductCatalog
-
-