Class DefaultLoadStoreFeaturesStrategy
java.lang.Object
de.hybris.platform.classification.strategy.impl.DefaultLoadStoreFeaturesStrategy
- All Implemented Interfaces:
LoadStoreFeaturesStrategy
Default implementation of
LoadStoreFeaturesStrategy interface.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddeleteObsoleteValues(ProductModel product, List<ClassAttributeAssignmentModel> allAssignments, List<ProductFeatureModel> correctlyStored) loadFeatures(List<ClassAttributeAssignmentModel> assignments, ProductModel product) Load features for particular product.loadTypedFeatures(List<ClassAttributeAssignmentModel> assignments, ProductModel product) loadUntypedFeatures(ProductModel product) voidreplaceFeatures(List<ClassAttributeAssignmentModel> allAssignments, ProductModel product, List<Feature> features) Store features for particular product to the database.voidsetCommonI18nService(CommonI18NService commonI18nService) voidsetI18nService(I18NService i18nService) voidsetModelService(ModelService modelService) voidsetProductFeaturesDao(ProductFeaturesDao productFeaturesDao) voidsetTxTemplate(org.springframework.transaction.support.TransactionTemplate txTemplate) voidstoreFeatures(ProductModel product, List<Feature> features) Store features for particular product to the database.protected List<ProductFeatureModel>storeFeaturesInTx(ProductModel product, List<Feature> features)
-
Constructor Details
-
DefaultLoadStoreFeaturesStrategy
public DefaultLoadStoreFeaturesStrategy()
-
-
Method Details
-
loadFeatures
public List<Feature> loadFeatures(List<ClassAttributeAssignmentModel> assignments, ProductModel product) Description copied from interface:LoadStoreFeaturesStrategyLoad features for particular product.- Specified by:
loadFeaturesin interfaceLoadStoreFeaturesStrategyproduct- the product for which list ofFeatures will be loaded- Returns:
- the result list of
Featureobjects
-
loadUntypedFeatures
-
loadTypedFeatures
protected List<Feature> loadTypedFeatures(List<ClassAttributeAssignmentModel> assignments, ProductModel product) -
storeFeatures
Description copied from interface:LoadStoreFeaturesStrategyStore features for particular product to the database. IfremoveRemainingflag is set totrueall existing features which are not on thefeatureslist will be removed.- Specified by:
storeFeaturesin interfaceLoadStoreFeaturesStrategy- Parameters:
product- the productfeatures- the list of features to store
-
replaceFeatures
public void replaceFeatures(List<ClassAttributeAssignmentModel> allAssignments, ProductModel product, List<Feature> features) Description copied from interface:LoadStoreFeaturesStrategyStore features for particular product to the database. IfremoveRemainingflag is set totrueall existing features which are not on thefeatureslist will be removed.- Specified by:
replaceFeaturesin interfaceLoadStoreFeaturesStrategy- Parameters:
allAssignments- all assignment to take into consideration for replacementproduct- the productfeatures- the list of features to store
-
storeFeaturesInTx
-
deleteObsoleteValues
protected void deleteObsoleteValues(ProductModel product, List<ClassAttributeAssignmentModel> allAssignments, List<ProductFeatureModel> correctlyStored) -
setProductFeaturesDao
-
setModelService
-
setTxTemplate
public void setTxTemplate(org.springframework.transaction.support.TransactionTemplate txTemplate) -
setI18nService
-
setCommonI18nService
-