Package de.hybris.platform.product.daos
Interface ProductDao
-
- All Superinterfaces:
Dao
- All Known Implementing Classes:
DefaultProductDao
public interface ProductDao extends Dao
TheProductModelDAO.- Spring Bean ID:
- productDao
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description java.lang.IntegerfindAllProductsCountByCategory(CategoryModel category)Counts all products of the specificCategoryModelexcluding double linked products.java.util.List<ProductModel>findOfflineProductsByCategory(CategoryModel category)Returns all offline products that belong to the specified category.java.util.List<ProductModel>findOnlineProductsByCategory(CategoryModel category)Returns all online products that belong to the specified category.java.util.List<ProductModel>findProducts(CategoryModel category, boolean online)Deprecated.since ages - as of release 4.3, please usefindOfflineProductsByCategory(CategoryModel)orfindOnlineProductsByCategory(CategoryModel)java.util.List<ProductModel>findProductsByCatalogVersion(CatalogVersionModel catalogVersion)Returns for the given productcatalogVersiontheProductModelcollection.SearchResult<ProductModel>findProductsByCategory(CategoryModel category, int start, int count)Returns for the givenCategoryModeland all sub categories all foundProductModels.java.util.List<ProductModel>findProductsByCode(CatalogVersionModel catalogVersion, java.lang.String code)java.util.List<ProductModel>findProductsByCode(java.lang.String code)Returns for the given productcodetheProductModelcollection.java.lang.IntegerfindProductsCountByCategory(CategoryModel category)Counts all products of the specificCategoryModel
-
-
-
Method Detail
-
findProductsByCategory
SearchResult<ProductModel> findProductsByCategory(CategoryModel category, int start, int count)
Returns for the givenCategoryModeland all sub categories all foundProductModels.- Parameters:
category- the (root) category in which the search for the products startsstart- 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
SearchResultwith the found results. A SearchResult is used for the paging (start,count) of the elements. - Throws:
java.lang.IllegalArgumentException- ifcategoryisnull
-
findProducts
@Deprecated java.util.List<ProductModel> findProducts(CategoryModel category, boolean online)
Deprecated.since ages - as of release 4.3, please usefindOfflineProductsByCategory(CategoryModel)orfindOnlineProductsByCategory(CategoryModel)Returns all online or offline products that belong to the specified category.
- Parameters:
category- the category the returned products belong toonline- 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
java.util.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
java.util.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
java.util.List<ProductModel> findProductsByCode(java.lang.String code)
Returns for the given productcodetheProductModelcollection.- Parameters:
code- the productcode- Returns:
- a
ProductModel - Throws:
java.lang.IllegalArgumentException- if the givencodeisnull
-
findProductsByCatalogVersion
java.util.List<ProductModel> findProductsByCatalogVersion(CatalogVersionModel catalogVersion)
Returns for the given productcatalogVersiontheProductModelcollection.- Parameters:
catalogVersion- the productcatalogVersion- Returns:
- a
ProductModel - Throws:
java.lang.IllegalArgumentException- if the givencatalogVersionisnull
-
findProductsByCode
java.util.List<ProductModel> findProductsByCode(CatalogVersionModel catalogVersion, java.lang.String code)
- Parameters:
catalogVersion- the catalog versioncode- the product code- Returns:
- a
ProductModel - Throws:
java.lang.IllegalArgumentException- ofcatalogVersionorcodeisnull
-
findAllProductsCountByCategory
java.lang.Integer findAllProductsCountByCategory(CategoryModel category)
Counts all products of the specificCategoryModelexcluding 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
java.lang.Integer findProductsCountByCategory(CategoryModel category)
Counts all products of the specificCategoryModel- Returns:
- amount of all products of the category.
-
-