Class DefaultProductDao

    • Constructor Detail

      • DefaultProductDao

        public DefaultProductDao​(java.lang.String typecode)
    • Method Detail

      • findProductsByCategory

        public SearchResult<ProductModel> findProductsByCategory​(CategoryModel category,
                                                                 int start,
                                                                 int count)
        Description copied from interface: ProductDao
        Returns for the given CategoryModel and all sub categories all found ProductModels.
        Specified by:
        findProductsByCategory in interface ProductDao
        Parameters:
        category - the (root) category in which the search for the products starts
        start - the start number of the search range. Set this value to 0 for getting all products.
        count - the number of elements in the search range. Set this value to -1 for getting all products.
        Returns:
        a SearchResult with the found results. A SearchResult is used for the paging (start,count) of the elements.
      • findProducts

        public java.util.List<ProductModel> findProducts​(CategoryModel category,
                                                         boolean online)
        Specified by:
        findProducts in interface ProductDao
        Parameters:
        category - the category the returned products belong to
        online - true for online products, or false for offline products
        Returns:
        all found products that belong to the specified category, or empty list if no product can be found.
      • findAllProductsCountByCategory

        public java.lang.Integer findAllProductsCountByCategory​(CategoryModel category)
        Description copied from interface: ProductDao
        Counts all products of the specific CategoryModel excluding double linked products. This includes all its own products and products belonging to any sub category.
        Specified by:
        findAllProductsCountByCategory in interface ProductDao
        Returns:
        amount of all products of the category.
      • findOfflineProductsByCategory

        public java.util.List<ProductModel> findOfflineProductsByCategory​(CategoryModel category)
        Description copied from interface: ProductDao
        Returns all offline products that belong to the specified category.
        Specified by:
        findOfflineProductsByCategory in interface ProductDao
        Parameters:
        category - the category the returned products belong to
        Returns:
        all found products that belong to the specified category, or empty list if no product can be found.
      • findOnlineProductsByCategory

        public java.util.List<ProductModel> findOnlineProductsByCategory​(CategoryModel category)
        Description copied from interface: ProductDao
        Returns all online products that belong to the specified category.
        Specified by:
        findOnlineProductsByCategory in interface ProductDao
        Parameters:
        category - the category the returned products belong to
        Returns:
        all found products that belong to the specified category, or empty list if no product can be found.