Interface LoadStoreFeaturesStrategy
- All Known Implementing Classes:
DefaultLoadStoreFeaturesStrategy
public interface LoadStoreFeaturesStrategy
Strategy for loading features from database and storing features back to database.
- Spring Bean ID:
- loadStoreFeaturesStrategy
-
Method Summary
Modifier and TypeMethodDescriptionloadFeatures(List<ClassAttributeAssignmentModel> assignments, ProductModel product) Load features for particular product.voidreplaceFeatures(List<ClassAttributeAssignmentModel> allAssignments, ProductModel product, List<Feature> features) Store features for particular product to the database.voidstoreFeatures(ProductModel product, List<Feature> features) Store features for particular product to the database.
-
Method Details
-
loadFeatures
Load features for particular product.- Parameters:
product- the product for which list ofFeatures will be loaded- Returns:
- the result list of
Featureobjects - Throws:
IllegalArgumentException- thrown whenproductis not persisted
-
storeFeatures
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:
IllegalArgumentException- thrown whenproductis not persisted
-
replaceFeatures
void replaceFeatures(List<ClassAttributeAssignmentModel> allAssignments, ProductModel product, 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:
IllegalArgumentException- thrown whenproductis not persisted
-