Class DefaultTmaSubscriptionPricePlanDao
- java.lang.Object
-
- de.hybris.platform.b2ctelcoservices.daos.impl.DefaultTmaSubscriptionPricePlanDao
-
- All Implemented Interfaces:
TmaSubscriptionPricePlanDao
public class DefaultTmaSubscriptionPricePlanDao extends java.lang.Object implements TmaSubscriptionPricePlanDao
Default implementation of theTmaSubscriptionPricePlanDao.- Since:
- 6.7
-
-
Constructor Summary
Constructors Constructor Description DefaultTmaSubscriptionPricePlanDao()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voidenhanceQueryWithSortingCondition(de.hybris.platform.core.GenericQuery query)Enhance the query with a condition to sort descending after priorityprotected java.util.Set<PriceRowModel>filterAfterRequiredProducts(java.util.Set<PriceRowModel> priceRows, java.util.Set<ProductModel> requiredProducts)Returns the price rows on which the required products set match the required products sent as parameter, otherwise returns the price rows on which the required price class set match the required price class retrieved from the required products sentprotected java.util.Set<SubscriptionPricePlanModel>filterByRequiredProducts(java.util.Set<SubscriptionPricePlanModel> poPrices, java.util.Set<ProductModel> requiredProducts)Deprecated.since 2007.protected java.util.Set<PriceRowModel>filterPriceRows(TmaPriceContext priceContext)Deprecated.since 2003.java.util.Set<PriceRowModel>filterPricesForContext(TmaPriceContext priceContext)Filter and retrieves all the instances ofPriceRowModels andSubscriptionPricePlanModels for the {@param priceContext} provided.protected java.util.Set<SubscriptionPricePlanModel>filterSubscriptionPricePlans(TmaPriceContext priceContext)Deprecated.since 2003.java.util.Set<PriceRowModel>findAllApplicablePricesForContext(TmaPriceContext priceContext)Retrieves allPriceRowModels which may be applicable for the context and the {@param priceContext#product} given, be it either the stand alone price of the product or a price override for which the {@param priceContext#product} represents thePriceRowModel.getAffectedProductOffering()of the price.java.util.Set<PriceRowModel>findApplicablePriceRows(TmaPriceContext priceContext)Retrieves all instances ofPriceRowModels exclusively for the {@param priceContext} provided.java.util.Set<SubscriptionPricePlanModel>findApplicableSubscriptionPricePlans(TmaPriceContext priceContext)Retrieves all instances ofSubscriptionPricePlanModels for the {@param priceContext} provided.java.util.Set<SubscriptionPricePlanModel>findBpoSubscriptionPricePlansForContext(TmaPriceContext priceContext)Retrieves allSubscriptionPricePlanModels for the {@param priceContext} provided.protected java.util.Set<PriceRowModel>findPriceRows(TmaPriceContext priceContext, boolean typeExclusive)Retrieves all instances ofPriceRowModels exclusively if type exclusive is true otherwise all instances ofPriceRowModels and subtypes, for the {@param priceContext} provided.protected de.hybris.platform.genericsearch.GenericSearchServicegetGenericSearchService()protected TmaGenericSearchProcessorgetPriceRowProcessor()protected TmaGenericSearchProcessorgetSubscriptionPricePlanProcessor()protected TmaGenericSearchProcessorgetTmaPriceRowFilterSearchProcessor()protected TmaGenericSearchProcessorgetTmaSppFilterSearchProcessor()voidsetGenericSearchService(de.hybris.platform.genericsearch.GenericSearchService genericSearchService)voidsetPriceRowProcessor(TmaGenericSearchProcessor priceRowProcessor)voidsetSubscriptionPricePlanProcessor(TmaGenericSearchProcessor subscriptionPricePlanProcessor)voidsetTmaPriceRowFilterSearchProcessor(TmaGenericSearchProcessor tmaPriceRowFilterSearchProcessor)voidsetTmaSppFilterSearchProcessor(TmaGenericSearchProcessor tmaSppFilterSearchProcessor)protected booleanshouldFilterByRequiredProducts(TmaPriceContext priceContext)Determines whether the filtering based onTmaPriceContext.requiredProductsshould be applied considering the following rules: theTmaPriceContext.productis aTmaBundledProductOfferingModeltheTmaPriceContext.requiredProductsis a non-null object (empty set is considered as non-null object)
-
-
-
Method Detail
-
findAllApplicablePricesForContext
public java.util.Set<PriceRowModel> findAllApplicablePricesForContext(TmaPriceContext priceContext)
Description copied from interface:TmaSubscriptionPricePlanDaoRetrieves allPriceRowModels which may be applicable for the context and the {@param priceContext#product} given, be it either the stand alone price of the product or a price override for which the {@param priceContext#product} represents thePriceRowModel.getAffectedProductOffering()of the price.- Specified by:
findAllApplicablePricesForContextin interfaceTmaSubscriptionPricePlanDao- Parameters:
priceContext- priceContext to retrieve the configuration from- Returns:
PriceRowModels for the {@param priceContext#product} having the configuration provided by the {@param priceContext}
-
findApplicableSubscriptionPricePlans
public java.util.Set<SubscriptionPricePlanModel> findApplicableSubscriptionPricePlans(TmaPriceContext priceContext)
Description copied from interface:TmaSubscriptionPricePlanDaoRetrieves all instances ofSubscriptionPricePlanModels for the {@param priceContext} provided.- Specified by:
findApplicableSubscriptionPricePlansin interfaceTmaSubscriptionPricePlanDao- Parameters:
priceContext- priceContext to retrieve the configuration from- Returns:
SubscriptionPricePlanModels having the configuration provided by the {@param priceContext}
-
findApplicablePriceRows
public java.util.Set<PriceRowModel> findApplicablePriceRows(TmaPriceContext priceContext)
Description copied from interface:TmaSubscriptionPricePlanDaoRetrieves all instances ofPriceRowModels exclusively for the {@param priceContext} provided.- Specified by:
findApplicablePriceRowsin interfaceTmaSubscriptionPricePlanDao- Parameters:
priceContext- priceContext to retrieve the configuration from- Returns:
PriceRowModels having the configuration provided by the {@param priceContext}
-
findBpoSubscriptionPricePlansForContext
public java.util.Set<SubscriptionPricePlanModel> findBpoSubscriptionPricePlansForContext(TmaPriceContext priceContext)
Description copied from interface:TmaSubscriptionPricePlanDaoRetrieves allSubscriptionPricePlanModels for the {@param priceContext} provided.- Specified by:
findBpoSubscriptionPricePlansForContextin interfaceTmaSubscriptionPricePlanDao- Parameters:
priceContext- priceContext to retrieve the configuration from- Returns:
SubscriptionPricePlanModels having the configuration provided by the {@param priceContext}
-
filterPricesForContext
public java.util.Set<PriceRowModel> filterPricesForContext(TmaPriceContext priceContext)
Description copied from interface:TmaSubscriptionPricePlanDaoFilter and retrieves all the instances ofPriceRowModels andSubscriptionPricePlanModels for the {@param priceContext} provided.- Specified by:
filterPricesForContextin interfaceTmaSubscriptionPricePlanDao- Parameters:
priceContext- priceContext to retrieve the configuration from- Returns:
PriceRowModels for the {@param priceContext#product} having the configuration provided by the {@param priceContext}
-
shouldFilterByRequiredProducts
protected boolean shouldFilterByRequiredProducts(TmaPriceContext priceContext)
Determines whether the filtering based onTmaPriceContext.requiredProductsshould be applied considering the following rules:- the
TmaPriceContext.productis aTmaBundledProductOfferingModel - the
TmaPriceContext.requiredProductsis a non-null object (empty set is considered as non-null object)
- Parameters:
priceContext- the price context for which the decision to apply the filtering is made- Returns:
trueis case the above rules are applied,falseotherwise
- the
-
filterByRequiredProducts
@Deprecated(since="2007") protected java.util.Set<SubscriptionPricePlanModel> filterByRequiredProducts(java.util.Set<SubscriptionPricePlanModel> poPrices, java.util.Set<ProductModel> requiredProducts)
Deprecated.since 2007. Use instead filterAfterRequiredProducts(Set, Set ) Returns the prices on which the required products set match the required products sent as parameter, otherwise returns the prices on which the required price class set match the required price class retrieved from the required products sent- Parameters:
poPrices- the prices to be filteredrequiredProducts- the required products to be compared with the ones set on the prices- Returns:
- the filtered prices
-
findPriceRows
protected java.util.Set<PriceRowModel> findPriceRows(TmaPriceContext priceContext, boolean typeExclusive)
Retrieves all instances ofPriceRowModels exclusively if type exclusive is true otherwise all instances ofPriceRowModels and subtypes, for the {@param priceContext} provided. In case of BPO with affected product it retrieves only price overrides.- Parameters:
priceContext- priceContext to retrieve the configuration fromtypeExclusive- true if exclusive type should be returned, otherwise false- Returns:
PriceRowModels having the configuration provided by the {@param priceContext}
-
enhanceQueryWithSortingCondition
protected void enhanceQueryWithSortingCondition(de.hybris.platform.core.GenericQuery query)
Enhance the query with a condition to sort descending after priority- Parameters:
query- the query to be enhanced
-
filterAfterRequiredProducts
protected java.util.Set<PriceRowModel> filterAfterRequiredProducts(java.util.Set<PriceRowModel> priceRows, java.util.Set<ProductModel> requiredProducts)
Returns the price rows on which the required products set match the required products sent as parameter, otherwise returns the price rows on which the required price class set match the required price class retrieved from the required products sent- Parameters:
priceRows- the price rows to be filteredrequiredProducts- the required products to be compared with the ones set on the prices- Returns:
- the filtered prices
-
filterSubscriptionPricePlans
@Deprecated(since="2003") protected java.util.Set<SubscriptionPricePlanModel> filterSubscriptionPricePlans(TmaPriceContext priceContext)
Deprecated.since 2003. Use insteadTmaSubscriptionPricePlanDao#findApplicableSubscriptionPricePlans(priceContext)
-
filterPriceRows
@Deprecated(since="2003") protected java.util.Set<PriceRowModel> filterPriceRows(TmaPriceContext priceContext)
Deprecated.since 2003. Use insteadTmaSubscriptionPricePlanDao#findApplicablePriceRows(priceContext)
-
getGenericSearchService
protected de.hybris.platform.genericsearch.GenericSearchService getGenericSearchService()
-
setGenericSearchService
public void setGenericSearchService(de.hybris.platform.genericsearch.GenericSearchService genericSearchService)
-
getSubscriptionPricePlanProcessor
protected TmaGenericSearchProcessor getSubscriptionPricePlanProcessor()
-
setSubscriptionPricePlanProcessor
public void setSubscriptionPricePlanProcessor(TmaGenericSearchProcessor subscriptionPricePlanProcessor)
-
getPriceRowProcessor
protected TmaGenericSearchProcessor getPriceRowProcessor()
-
setPriceRowProcessor
public void setPriceRowProcessor(TmaGenericSearchProcessor priceRowProcessor)
-
getTmaSppFilterSearchProcessor
protected TmaGenericSearchProcessor getTmaSppFilterSearchProcessor()
-
setTmaSppFilterSearchProcessor
public void setTmaSppFilterSearchProcessor(TmaGenericSearchProcessor tmaSppFilterSearchProcessor)
-
getTmaPriceRowFilterSearchProcessor
protected TmaGenericSearchProcessor getTmaPriceRowFilterSearchProcessor()
-
setTmaPriceRowFilterSearchProcessor
public void setTmaPriceRowFilterSearchProcessor(TmaGenericSearchProcessor tmaPriceRowFilterSearchProcessor)
-
-