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 to
AbstractBundleRuleModel.- Spring Bean ID:
- bundleRuleDao
-
Method Summary
Modifier and TypeMethodDescriptionfindBundleRulesByProductAndRootTemplate(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.findBundleRulesByTargetProduct(ProductModel targetProduct) Find allAbstractBundleRuleModels that have the giventargetProductas target product.findBundleRulesByTargetProductAndTemplate(ProductModel targetProduct, BundleTemplateModel bundleTemplate) Find allAbstractBundleRuleModels that are assigned to the givenbundleTemplateand have the giventargetProductas target product.
-
Method Details
-
findBundleRulesByTargetProduct
Find allAbstractBundleRuleModels that have the giventargetProductas target product.- Parameters:
targetProduct- the targetProductModelof the bundle rule- Returns:
ListofAbstractBundleRuleModels or emptyList.
-
findBundleRulesByTargetProductAndTemplate
@Nonnull 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 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.
-