Class DefaultTuaProductService
java.lang.Object
de.hybris.platform.subscribedproductservices.services.impl.DefaultTuaProductService
- All Implemented Interfaces:
TuaProductService
Default implementation of
TuaProductService.- Since:
- 2208
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultTuaProductService(TuaProductDao spiProductDao, de.hybris.platform.servicelayer.model.ModelService modelService) -
Method Summary
Modifier and TypeMethodDescriptioncreateProduct(Class productClass) Creates an instance ofTuaProductModelsubtype.protected de.hybris.platform.servicelayer.model.ModelServicegetNumberOfProductsFor(SpiProductContext spiProductContext) Retrieves the total number of products found for a given productContext.getProduct(String id) Returns aTuaProductModelfor the given id.getProducts(SpiProductContext spiProductContext, Integer offset, Integer limit) Retrieves a list ofTuaProductModelfor a given product context.protected TuaProductDaovoidremoveProduct(TuaProductModel product) Removes the givenTuaProductModelvoidsaveProduct(TuaProductModel product) Saves the givenTuaProductModel.
-
Constructor Details
-
DefaultTuaProductService
public DefaultTuaProductService(TuaProductDao spiProductDao, de.hybris.platform.servicelayer.model.ModelService modelService)
-
-
Method Details
-
getProduct
Description copied from interface:TuaProductServiceReturns aTuaProductModelfor the given id.- Specified by:
getProductin interfaceTuaProductService- Parameters:
id- identifier ofTuaProductModel- Returns:
- the
TuaProductModelfound.
-
getProducts
public List<TuaProductModel> getProducts(SpiProductContext spiProductContext, Integer offset, Integer limit) Description copied from interface:TuaProductServiceRetrieves a list ofTuaProductModelfor a given product context.- Specified by:
getProductsin interfaceTuaProductService- Parameters:
spiProductContext- the product context.offset- the offset.limit- the maximum number of returned products.- Returns:
- the list of products found for the given context.
-
getNumberOfProductsFor
Description copied from interface:TuaProductServiceRetrieves the total number of products found for a given productContext.- Specified by:
getNumberOfProductsForin interfaceTuaProductService- Parameters:
spiProductContext- the product context.- Returns:
- the number of products found.
-
saveProduct
Description copied from interface:TuaProductServiceSaves the givenTuaProductModel.- Specified by:
saveProductin interfaceTuaProductService- Parameters:
product- the product.
-
createProduct
Description copied from interface:TuaProductServiceCreates an instance ofTuaProductModelsubtype.- Specified by:
createProductin interfaceTuaProductService- Parameters:
productClass- the class of theTuaProductModelsubtype.- Returns:
- the newly created model.
-
removeProduct
Description copied from interface:TuaProductServiceRemoves the givenTuaProductModel- Specified by:
removeProductin interfaceTuaProductService- Parameters:
product- the product.
-
getTuaProductDao
-
getModelService
protected de.hybris.platform.servicelayer.model.ModelService getModelService()
-