Interface BundleRuleDao<R extends AbstractBundleRuleModel>
-
- All Known Subinterfaces:
ChangeProductPriceBundleRuleDao
- All Known Implementing Classes:
AbstractBundleRuleDao,DefaultChangeProductPriceBundleRuleDao,DefaultDisableProductBundleRuleDao
public interface BundleRuleDao<R extends AbstractBundleRuleModel>Data Access Object for looking up items related toAbstractBundleRuleModel.- Spring Bean ID:
- bundleRuleDao
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<R>findBundleRulesByProductAndRootTemplate(ProductModel product, BundleTemplateModel rootBundleTemplate)Find allAbstractBundleRuleModels that are assigned to any of the givenrootBundleTemplate's child components and have the givenproducteither as target product or as conditional product.java.util.List<R>findBundleRulesByTargetProduct(ProductModel targetProduct)Find allAbstractBundleRuleModels that have the giventargetProductas target product.java.util.List<R>findBundleRulesByTargetProductAndTemplate(ProductModel targetProduct, BundleTemplateModel bundleTemplate)Find allAbstractBundleRuleModels that are assigned to the givenbundleTemplateand have the giventargetProductas target product.
-
-
-
Method Detail
-
findBundleRulesByTargetProduct
@Nonnull java.util.List<R> findBundleRulesByTargetProduct(@Nonnull ProductModel targetProduct)
Find allAbstractBundleRuleModels that have the giventargetProductas target product.- Parameters:
targetProduct- the targetProductModelof the bundle rule- Returns:
ListofAbstractBundleRuleModels or emptyList.
-
findBundleRulesByTargetProductAndTemplate
@Nonnull java.util.List<R> findBundleRulesByTargetProductAndTemplate(@Nonnull ProductModel targetProduct, @Nonnull BundleTemplateModel bundleTemplate)
Find allAbstractBundleRuleModels that are assigned to the givenbundleTemplateand have the giventargetProductas target product.- Parameters:
targetProduct- the targetProductModelof the bundle rulebundleTemplate- theBundleTemplateModelthe bundle rule is assigned to- Returns:
ListofAbstractBundleRuleModels or emptyList.
-
findBundleRulesByProductAndRootTemplate
@Nonnull java.util.List<R> findBundleRulesByProductAndRootTemplate(@Nonnull ProductModel product, @Nonnull BundleTemplateModel rootBundleTemplate)
Find allAbstractBundleRuleModels that are assigned to any of the givenrootBundleTemplate's child components and have the givenproducteither as target product or as conditional product.- Parameters:
product- theProductModelthat is added to cartrootBundleTemplate- the rootBundleTemplateModel. OnlyDisableProductBundleRuleModels that are assigned to any of therootBundleTemplate's child components, are retrieved.- Returns:
ListofAbstractBundleRuleModels or emptyList.
-
-