Class CatalogImpl

    • Field Detail

      • logger

        private static final org.slf4j.Logger logger
    • Constructor Detail

      • CatalogImpl

        public CatalogImpl()
    • Method Detail

      • setEntityManager

        public void setEntityManager​(EntityManager entityManager)
      • getProducts

        public List<Product> getProducts​(int offset,
                                         int limit)
        Description copied from interface: Catalog
        Returns a list of products in the catalog chunked into page sizes.
        Specified by:
        getProducts in interface Catalog
        Returns:
        list of products matching the paging criteria
      • addToCart

        public int addToCart​(int id,
                             String email)
        Description copied from interface: Catalog
        Adds the selected product to the users' shopping cart and returns the count of items.
        Specified by:
        addToCart in interface Catalog
        Returns:
        number of items in cart