Interface ProductDao

All Superinterfaces:
Dao
All Known Implementing Classes:
DefaultProductDao

public interface ProductDao extends Dao
The ProductModel DAO.
Spring Bean ID:
productDao
  • Method Details

    • findProductsByCategory

      SearchResult<ProductModel> findProductsByCategory(CategoryModel category, int start, int count)
      Returns for the given CategoryModel and all sub categories all found ProductModels.
      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.
      Throws:
      IllegalArgumentException - if category is null
    • findProducts

      @Deprecated(since="ages", forRemoval=true) List<ProductModel> findProducts(CategoryModel category, boolean online)
      Deprecated, for removal: This API element is subject to removal in a future version.
      since ages - as of release 4.3, please usefindOfflineProductsByCategory(CategoryModel) or findOnlineProductsByCategory(CategoryModel)

      Returns all online or offline products that belong to the specified category.

      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.
    • findOnlineProductsByCategory

      List<ProductModel> findOnlineProductsByCategory(CategoryModel category)
      Returns all online products that belong to the specified category.
      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.
    • findOfflineProductsByCategory

      List<ProductModel> findOfflineProductsByCategory(CategoryModel category)
      Returns all offline products that belong to the specified category.
      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.
    • findProductsByCode

      List<ProductModel> findProductsByCode(String code)
      Returns for the given product code the ProductModel collection.
      Parameters:
      code - the product code
      Returns:
      a ProductModel
      Throws:
      IllegalArgumentException - if the given code is null
    • findProductsByCatalogVersion

      List<ProductModel> findProductsByCatalogVersion(CatalogVersionModel catalogVersion)
      Returns for the given product catalogVersion the ProductModel collection.
      Parameters:
      catalogVersion - the product catalogVersion
      Returns:
      a ProductModel
      Throws:
      IllegalArgumentException - if the given catalogVersion is null
    • findProductsByCode

      List<ProductModel> findProductsByCode(CatalogVersionModel catalogVersion, String code)
      Returns for the given product code and the given CatalogVersionModel the ProductModel .
      Parameters:
      catalogVersion - the catalog version
      code - the product code
      Returns:
      a ProductModel
      Throws:
      IllegalArgumentException - of catalogVersion or code is null
    • findAllProductsCountByCategory

      Integer findAllProductsCountByCategory(CategoryModel category)
      Counts all products of the specific CategoryModel excluding double linked products. This includes all its own products and products belonging to any sub category.
      Returns:
      amount of all products of the category.
    • findProductsCountByCategory

      Integer findProductsCountByCategory(CategoryModel category)
      Counts all products of the specific CategoryModel
      Returns:
      amount of all products of the category.