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 Details

    • loadFeatures

      List<Feature> loadFeatures(List<ClassAttributeAssignmentModel> assignments, ProductModel product)
      Load features for particular product.
      Parameters:
      product - the product for which list of Features will be loaded
      Returns:
      the result list of Feature objects
      Throws:
      IllegalArgumentException - thrown when product is not persisted
    • storeFeatures

      void storeFeatures(ProductModel product, List<Feature> features)
      Store features for particular product to the database. If removeRemaining flag is set to true all existing features which are not on the features list will be removed.
      Parameters:
      product - the product
      features - the list of features to store
      Throws:
      IllegalArgumentException - thrown when product is not persisted
    • replaceFeatures

      void replaceFeatures(List<ClassAttributeAssignmentModel> allAssignments, ProductModel product, List<Feature> features)
      Store features for particular product to the database. If removeRemaining flag is set to true all existing features which are not on the features list will be removed.
      Parameters:
      allAssignments - all assignment to take into consideration for replacement
      product - the product
      features - the list of features to store
      Throws:
      IllegalArgumentException - thrown when product is not persisted