Package ejava.examples.blpurchase.blimpl
Class CatalogImpl
- java.lang.Object
-
- ejava.examples.blpurchase.blimpl.CatalogImpl
-
-
Field Summary
Fields Modifier and Type Field Description private EntityManageremprivate static org.slf4j.Loggerlogger
-
Constructor Summary
Constructors Constructor Description CatalogImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intaddToCart(int id, String email)Adds the selected product to the users' shopping cart and returns the count of items.List<Product>getProducts(int offset, int limit)Returns a list of products in the catalog chunked into page sizes.voidsetEntityManager(EntityManager entityManager)
-
-
-
Field Detail
-
logger
private static final org.slf4j.Logger logger
-
em
private EntityManager em
-
-
Method Detail
-
setEntityManager
public void setEntityManager(EntityManager entityManager)
-
getProducts
public List<Product> getProducts(int offset, int limit)
Description copied from interface:CatalogReturns a list of products in the catalog chunked into page sizes.- Specified by:
getProductsin interfaceCatalog- Returns:
- list of products matching the paging criteria
-
-