Class DefaultLoadStoreFeaturesStrategy
- java.lang.Object
-
- de.hybris.platform.classification.strategy.impl.DefaultLoadStoreFeaturesStrategy
-
- All Implemented Interfaces:
LoadStoreFeaturesStrategy
public class DefaultLoadStoreFeaturesStrategy extends java.lang.Object implements LoadStoreFeaturesStrategy
Default implementation ofLoadStoreFeaturesStrategyinterface.
-
-
Constructor Summary
Constructors Constructor Description DefaultLoadStoreFeaturesStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddeleteObsoleteValues(ProductModel product, java.util.List<ClassAttributeAssignmentModel> allAssignments, java.util.List<ProductFeatureModel> correctlyStored)java.util.List<Feature>loadFeatures(java.util.List<ClassAttributeAssignmentModel> assignments, ProductModel product)Load features for particular product.protected java.util.List<Feature>loadTypedFeatures(java.util.List<ClassAttributeAssignmentModel> assignments, ProductModel product)protected java.util.List<Feature>loadUntypedFeatures(ProductModel product)voidreplaceFeatures(java.util.List<ClassAttributeAssignmentModel> allAssignments, ProductModel product, java.util.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, java.util.List<Feature> features)Store features for particular product to the database.protected java.util.List<ProductFeatureModel>storeFeaturesInTx(ProductModel product, java.util.List<Feature> features)
-
-
-
Method Detail
-
loadFeatures
public java.util.List<Feature> loadFeatures(java.util.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
protected java.util.List<Feature> loadUntypedFeatures(ProductModel product)
-
loadTypedFeatures
protected java.util.List<Feature> loadTypedFeatures(java.util.List<ClassAttributeAssignmentModel> assignments, ProductModel product)
-
storeFeatures
public void storeFeatures(ProductModel product, java.util.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:
storeFeaturesin interfaceLoadStoreFeaturesStrategy- Parameters:
product- the productfeatures- the list of features to store
-
replaceFeatures
public void replaceFeatures(java.util.List<ClassAttributeAssignmentModel> allAssignments, ProductModel product, java.util.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
protected java.util.List<ProductFeatureModel> storeFeaturesInTx(ProductModel product, java.util.List<Feature> features)
-
deleteObsoleteValues
protected void deleteObsoleteValues(ProductModel product, java.util.List<ClassAttributeAssignmentModel> allAssignments, java.util.List<ProductFeatureModel> correctlyStored)
-
setProductFeaturesDao
public void setProductFeaturesDao(ProductFeaturesDao productFeaturesDao)
-
setModelService
public void setModelService(ModelService modelService)
-
setTxTemplate
public void setTxTemplate(org.springframework.transaction.support.TransactionTemplate txTemplate)
-
setI18nService
public void setI18nService(I18NService i18nService)
-
setCommonI18nService
public void setCommonI18nService(CommonI18NService commonI18nService)
-
-