Package de.hybris.platform.product.impl
Class DefaultProductService
java.lang.Object
de.hybris.platform.servicelayer.internal.service.AbstractService
de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
de.hybris.platform.product.impl.DefaultProductService
- All Implemented Interfaces:
ProductService,Serializable,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.InitializingBean
Default implementation of the
ProductService.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
AbstractService.SerializableDTO -
Field Summary
Fields inherited from class de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
modelService, sessionService, txManagerFields inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
tenant -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsProductsForCategory(CategoryModel category) Checks whether or not the specificCategoryModelor any of its sub-categories contains at least one product.getAllProductsCountForCategory(CategoryModel category) Counts all products of the specificCategoryModelexcluding double linked products.getAllProductsForCatalogVersion(CatalogVersionModel catalogVersion) Returns allProductModellist belonging to the specifiedCatalogVersionModelgetOfflineProductsForCategory(CategoryModel category) Returns all offline products that belong to the specified category.getOnlineProductsForCategory(CategoryModel category) Returns all online products that belong to the specified category.getOrderableUnit(ProductModel product) Deprecated, for removal: This API element is subject to removal in a future version.since agesgetProduct(CatalogVersionModel catalogVersion, String code) Deprecated, for removal: This API element is subject to removal in a future version.since agesgetProduct(String code) Deprecated, for removal: This API element is subject to removal in a future version.since agesprotected ProductDaogetProductForCode(CatalogVersionModel catalogVersion, String code) Returns the Product with the specified code belonging to the specified CatalogVersion.getProductForCode(String code) Returns the Product with the specified code.getProducts(CategoryModel category) Deprecated, for removal: This API element is subject to removal in a future version.since agesgetProducts(CategoryModel category, int start, int count) Deprecated, for removal: This API element is subject to removal in a future version.since agesgetProductsCountForCategory(CategoryModel category) Counts all products of the specificCategoryModel.getProductsForCategory(CategoryModel category) Returns all Products belonging to the specified Category as a List.getProductsForCategory(CategoryModel category, int start, int count) Returns the specified range of Products belonging to the specified Category as a List.Deprecated, for removal: This API element is subject to removal in a future version.since agesvoidsetPriceService(PriceService priceService) Deprecated, for removal: This API element is subject to removal in a future version.since agesvoidsetProductDao(ProductDao productDao) voidsetUnitDao(UnitDao unitDao) Deprecated, for removal: This API element is subject to removal in a future version.since agesMethods inherited from class de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
getModelService, getSessionService, getTxManager, setModelService, setSessionService, setTxManagerMethods inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
afterPropertiesSet, getCurrentTenant, setBeanName, setCurrentTenant, writeReplace
-
Constructor Details
-
DefaultProductService
public DefaultProductService()
-
-
Method Details
-
getProductForCode
Description copied from interface:ProductServiceReturns the Product with the specified code. As default the search uses the current session user, the current session language and the current active catalog versions (which are stored at the session in the attributeSESSION_CATALOG_VERSIONS). For modifying the search session context seeFlexibleSearchQuery.- Specified by:
getProductForCodein interfaceProductService- Parameters:
code- the code of the Product- Returns:
- the Product with the specified code.
-
getProduct
Deprecated, for removal: This API element is subject to removal in a future version.since ages- Specified by:
getProductin interfaceProductService- Parameters:
code- the code of the Product- Returns:
- the Product with the specified code.
-
getOrderableUnit
Deprecated, for removal: This API element is subject to removal in a future version.since agesDescription copied from interface:ProductServiceReturns for the givenproductthe first foundUnitModelfrom the PriceInformations of the product.- Specified by:
getOrderableUnitin interfaceProductService- Parameters:
product- theProductModel- Returns:
ProductModel.UNITif no PriceInformations is available at theProductModel
-
getAllProductsCountForCategory
Description copied from interface:ProductServiceCounts all products of the specificCategoryModelexcluding double linked products. This includes all its own products and products belonging to any sub category.- Specified by:
getAllProductsCountForCategoryin interfaceProductService- Parameters:
category- theCategoryModel- Returns:
- amount of all products of the category
-
getProductsCountForCategory
Description copied from interface:ProductServiceCounts all products of the specificCategoryModel.- Specified by:
getProductsCountForCategoryin interfaceProductService- Parameters:
category- theCategoryModel- Returns:
- amount of all products of the category
-
containsProductsForCategory
Description copied from interface:ProductServiceChecks whether or not the specificCategoryModelor any of its sub-categories contains at least one product.- Specified by:
containsProductsForCategoryin interfaceProductService- Parameters:
category- theCategoryModel- Returns:
- true if at least one product belong the the
CategoryModelor any of its sub-categories, false otherwise.
-
getUnit
Deprecated, for removal: This API element is subject to removal in a future version.since ages- Specified by:
getUnitin interfaceProductService- Parameters:
code- the code of the Unit- Returns:
- the Unit with the specified code
-
getProduct
@Deprecated(since="ages", forRemoval=true) public ProductModel getProduct(CatalogVersionModel catalogVersion, String code) Deprecated, for removal: This API element is subject to removal in a future version.since ages- Specified by:
getProductin interfaceProductService- Parameters:
catalogVersion- the CatalogVersion of the Productcode- the code of the Product- Returns:
- the Product matching the specified code and CatalogVersion.
-
getProductForCode
Description copied from interface:ProductServiceReturns the Product with the specified code belonging to the specified CatalogVersion.- Specified by:
getProductForCodein interfaceProductService- Parameters:
catalogVersion- the CatalogVersion of the Productcode- the code of the Product- Returns:
- the Product matching the specified code and CatalogVersion.
-
getProducts
@Deprecated(since="ages", forRemoval=true) public List<ProductModel> getProducts(CategoryModel category) Deprecated, for removal: This API element is subject to removal in a future version.since ages- Specified by:
getProductsin interfaceProductService- Parameters:
category- the category the returned Products belong to- Returns:
- a list of Products which belong to the specified Category
-
getProductsForCategory
Description copied from interface:ProductServiceReturns all Products belonging to the specified Category as a List. For the search the current session active catalog versions of the current user are used.- Specified by:
getProductsForCategoryin interfaceProductService- Parameters:
category- the category the returned Products belong to- Returns:
- a list of Products which belong to the specified Category
-
getProducts
@Deprecated(since="ages", forRemoval=true) public SearchResult<ProductModel> getProducts(CategoryModel category, int start, int count) Deprecated, for removal: This API element is subject to removal in a future version.since ages- Specified by:
getProductsin interfaceProductService- Parameters:
category- the category the returned Products belong tostart- index position of the first Product, which will be included in the returned Listcount- number of Products which will be returned in the List- Returns:
- a list of Products with belong to the specified Category
-
getProductsForCategory
Description copied from interface:ProductServiceReturns the specified range of Products belonging to the specified Category as a List. For the search the current session active catalogversions of the current user are used.- Specified by:
getProductsForCategoryin interfaceProductService- Parameters:
category- the category the returned Products belong tostart- index position of the first Product, which will be included in the returned Listcount- number of Products which will be returned in the List- Returns:
- a list of Products with belong to the specified Category
-
getOnlineProductsForCategory
Description copied from interface:ProductServiceReturns all online products that belong to the specified category.- Specified by:
getOnlineProductsForCategoryin interfaceProductService- Parameters:
category- the category the returned products belong to- Returns:
- all found products that belong to the specified category, or empty collection if no product can be found.
-
getOfflineProductsForCategory
Description copied from interface:ProductServiceReturns all offline products that belong to the specified category.- Specified by:
getOfflineProductsForCategoryin interfaceProductService- Parameters:
category- the category the returned products belong to- Returns:
- all found products that belong to the specified category, or empty collection if no product can be found.
-
getAllProductsForCatalogVersion
Description copied from interface:ProductServiceReturns allProductModellist belonging to the specifiedCatalogVersionModel- Specified by:
getAllProductsForCatalogVersionin interfaceProductService- Parameters:
catalogVersion- the CatalogVersion of the Products- Returns:
- Product list belonging to the CatalogVersion
-
setProductDao
-
getProductDao
- Returns:
- the productDao
-
setUnitDao
Deprecated, for removal: This API element is subject to removal in a future version.since ages -
setPriceService
Deprecated, for removal: This API element is subject to removal in a future version.since ages
-