Interface LoadStoreFeaturesStrategy
-
- All Known Implementing Classes:
DefaultLoadStoreFeaturesStrategy
public interface LoadStoreFeaturesStrategyStrategy for loading features from database and storing features back to database.- Spring Bean ID:
- loadStoreFeaturesStrategy
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<Feature>loadFeatures(java.util.List<ClassAttributeAssignmentModel> assignments, ProductModel product)Load features for particular product.voidreplaceFeatures(java.util.List<ClassAttributeAssignmentModel> allAssignments, ProductModel product, java.util.List<Feature> features)Store features for particular product to the database.voidstoreFeatures(ProductModel product, java.util.List<Feature> features)Store features for particular product to the database.
-
-
-
Method Detail
-
loadFeatures
java.util.List<Feature> loadFeatures(java.util.List<ClassAttributeAssignmentModel> assignments, ProductModel product)
Load features for particular product.- Parameters:
product- the product for which list ofFeatures will be loaded- Returns:
- the result list of
Featureobjects - Throws:
java.lang.IllegalArgumentException- thrown whenproductis not persisted
-
storeFeatures
void storeFeatures(ProductModel product, java.util.List<Feature> features)
Store features for particular product to the database. IfremoveRemainingflag is set totrueall existing features which are not on thefeatureslist will be removed.- Parameters:
product- the productfeatures- the list of features to store- Throws:
java.lang.IllegalArgumentException- thrown whenproductis not persisted
-
replaceFeatures
void replaceFeatures(java.util.List<ClassAttributeAssignmentModel> allAssignments, ProductModel product, java.util.List<Feature> features)
Store features for particular product to the database. IfremoveRemainingflag is set totrueall existing features which are not on thefeatureslist will be removed.- Parameters:
allAssignments- all assignment to take into consideration for replacementproduct- the productfeatures- the list of features to store- Throws:
java.lang.IllegalArgumentException- thrown whenproductis not persisted
-
-