Class DefaultProductDao
java.lang.Object
de.hybris.platform.servicelayer.internal.dao.DefaultGenericDao<ProductModel>
de.hybris.platform.product.daos.impl.DefaultProductDao
- All Implemented Interfaces:
ProductDao,Dao,GenericDao<ProductModel>
Default implementation of the
ProductDao.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfindAllProductsCountByCategory(CategoryModel category) Counts all products of the specificCategoryModelexcluding double linked products.findOfflineProductsByCategory(CategoryModel category) Returns all offline products that belong to the specified category.findOnlineProductsByCategory(CategoryModel category) Returns all online products that belong to the specified category.findProducts(CategoryModel category, boolean online) findProductsByCatalogVersion(CatalogVersionModel catalogVersion) Returns for the given productcatalogVersiontheProductModelcollection.findProductsByCategory(CategoryModel category, int start, int count) Returns for the givenCategoryModeland all sub categories all foundProductModels.findProductsByCode(CatalogVersionModel catalogVersion, String code) findProductsByCode(String code) Returns for the given productcodetheProductModelcollection.findProductsCountByCategory(CategoryModel category) Counts all products of the specificCategoryModelMethods inherited from class de.hybris.platform.servicelayer.internal.dao.DefaultGenericDao
find, find, find, find, find, getFlexibleSearchService, setFlexibleSearchService
-
Constructor Details
-
DefaultProductDao
-
-
Method Details
-
findProductsByCategory
public SearchResult<ProductModel> findProductsByCategory(CategoryModel category, int start, int count) Description copied from interface:ProductDaoReturns for the givenCategoryModeland all sub categories all foundProductModels.- Specified by:
findProductsByCategoryin interfaceProductDao- 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.
-
findProducts
- Specified by:
findProductsin interfaceProductDao- 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.
-
findProductsByCode
Description copied from interface:ProductDaoReturns for the given productcodetheProductModelcollection.- Specified by:
findProductsByCodein interfaceProductDao- Parameters:
code- the productcode- Returns:
- a
ProductModel
-
findProductsByCatalogVersion
Description copied from interface:ProductDaoReturns for the given productcatalogVersiontheProductModelcollection.- Specified by:
findProductsByCatalogVersionin interfaceProductDao- Parameters:
catalogVersion- the productcatalogVersion- Returns:
- a
ProductModel
-
findProductsByCode
Description copied from interface:ProductDao- Specified by:
findProductsByCodein interfaceProductDao- Parameters:
catalogVersion- the catalog versioncode- the product code- Returns:
- a
ProductModel
-
findAllProductsCountByCategory
Description copied from interface:ProductDaoCounts all products of the specificCategoryModelexcluding double linked products. This includes all its own products and products belonging to any sub category.- Specified by:
findAllProductsCountByCategoryin interfaceProductDao- Returns:
- amount of all products of the category.
-
findProductsCountByCategory
Description copied from interface:ProductDaoCounts all products of the specificCategoryModel- Specified by:
findProductsCountByCategoryin interfaceProductDao- Returns:
- amount of all products of the category.
-
findOfflineProductsByCategory
Description copied from interface:ProductDaoReturns all offline products that belong to the specified category.- Specified by:
findOfflineProductsByCategoryin interfaceProductDao- 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
Description copied from interface:ProductDaoReturns all online products that belong to the specified category.- Specified by:
findOnlineProductsByCategoryin interfaceProductDao- 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.
-