Class DefaultTmaSubscriptionPricePlanDao
java.lang.Object
de.hybris.platform.b2ctelcoservices.daos.impl.DefaultTmaSubscriptionPricePlanDao
- All Implemented Interfaces:
TmaSubscriptionPricePlanDao
public class DefaultTmaSubscriptionPricePlanDao
extends Object
implements TmaSubscriptionPricePlanDao
Default implementation of the
TmaSubscriptionPricePlanDao.- Since:
- 6.7
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidenhanceQueryWithSortingCondition(de.hybris.platform.core.GenericQuery query) Enhance the query with a condition to sort descending after priorityprotected Set<PriceRowModel>filterAfterRequiredProducts(Set<PriceRowModel> priceRows, 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 Set<SubscriptionPricePlanModel>filterByRequiredProducts(Set<SubscriptionPricePlanModel> poPrices, Set<ProductModel> requiredProducts) Deprecated.since 2007.protected Set<PriceRowModel>filterPriceRows(TmaPriceContext priceContext) Deprecated.since 2003.filterPricesForContext(TmaPriceContext priceContext) Filter and retrieves all the instances ofPriceRowModels andSubscriptionPricePlanModels for the provided.protected Set<SubscriptionPricePlanModel>filterSubscriptionPricePlans(TmaPriceContext priceContext) Deprecated.since 2003.findAllApplicablePricesForContext(TmaPriceContext priceContext) Retrieves allPriceRowModels which may be applicable for the context and the given, be it either the stand alone price of the product or a price override for which the represents thePDTRowModel.getAffectedProductOffering()of the price.findApplicablePriceRows(TmaPriceContext priceContext) Retrieves all instances ofPriceRowModels exclusively for the provided.findApplicableSubscriptionPricePlans(TmaPriceContext priceContext) Retrieves all instances ofSubscriptionPricePlanModels for the provided.protected 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 provided.protected de.hybris.platform.genericsearch.GenericSearchServiceprotected TmaGenericSearchProcessorprotected TmaGenericSearchProcessorprotected TmaGenericSearchProcessorprotected TmaGenericSearchProcessorvoidsetGenericSearchService(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.getRequiredProducts()should be applied considering the following rules: theTmaPriceContext.getProduct()is aTmaBundledProductOfferingModeltheTmaPriceContext.getRequiredProducts()is a non-null object (empty set is considered as non-null object)
-
Constructor Details
-
DefaultTmaSubscriptionPricePlanDao
public DefaultTmaSubscriptionPricePlanDao()
-
-
Method Details
-
findAllApplicablePricesForContext
Description copied from interface:TmaSubscriptionPricePlanDaoRetrieves allPriceRowModels which may be applicable for the context and the given, be it either the stand alone price of the product or a price override for which the represents thePDTRowModel.getAffectedProductOffering()of the price.- Specified by:
findAllApplicablePricesForContextin interfaceTmaSubscriptionPricePlanDao- Parameters:
priceContext- priceContext to retrieve the configuration from- Returns:
PriceRowModels for the having the configuration provided by the
-
findApplicableSubscriptionPricePlans
public Set<SubscriptionPricePlanModel> findApplicableSubscriptionPricePlans(TmaPriceContext priceContext) Description copied from interface:TmaSubscriptionPricePlanDaoRetrieves all instances ofSubscriptionPricePlanModels for the provided.- Specified by:
findApplicableSubscriptionPricePlansin interfaceTmaSubscriptionPricePlanDao- Parameters:
priceContext- priceContext to retrieve the configuration from- Returns:
SubscriptionPricePlanModels having the configuration provided by the
-
findApplicablePriceRows
Description copied from interface:TmaSubscriptionPricePlanDaoRetrieves all instances ofPriceRowModels exclusively for the provided.- Specified by:
findApplicablePriceRowsin interfaceTmaSubscriptionPricePlanDao- Parameters:
priceContext- priceContext to retrieve the configuration from- Returns:
PriceRowModels having the configuration provided by the
-
filterPricesForContext
Description copied from interface:TmaSubscriptionPricePlanDaoFilter and retrieves all the instances ofPriceRowModels andSubscriptionPricePlanModels for the provided.- Specified by:
filterPricesForContextin interfaceTmaSubscriptionPricePlanDao- Parameters:
priceContext- priceContext to retrieve the configuration from- Returns:
PriceRowModels for the having the configuration provided by the
-
shouldFilterByRequiredProducts
Determines whether the filtering based onTmaPriceContext.getRequiredProducts()should be applied considering the following rules:- the
TmaPriceContext.getProduct()is aTmaBundledProductOfferingModel - the
TmaPriceContext.getRequiredProducts()is 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 Set<SubscriptionPricePlanModel> filterByRequiredProducts(Set<SubscriptionPricePlanModel> poPrices, 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
Retrieves all instances ofPriceRowModels exclusively if type exclusive is true otherwise all instances ofPriceRowModels and subtypes, for the 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
-
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 Set<PriceRowModel> filterAfterRequiredProducts(Set<PriceRowModel> priceRows, 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 Set<SubscriptionPricePlanModel> filterSubscriptionPricePlans(TmaPriceContext priceContext) Deprecated.since 2003. Use insteadTmaSubscriptionPricePlanDao.findApplicableSubscriptionPricePlans(priceContext) -
filterPriceRows
@Deprecated(since="2003") protected 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
-
setSubscriptionPricePlanProcessor
public void setSubscriptionPricePlanProcessor(TmaGenericSearchProcessor subscriptionPricePlanProcessor) -
getPriceRowProcessor
-
setPriceRowProcessor
-
getTmaSppFilterSearchProcessor
-
setTmaSppFilterSearchProcessor
-
getTmaPriceRowFilterSearchProcessor
-
setTmaPriceRowFilterSearchProcessor
public void setTmaPriceRowFilterSearchProcessor(TmaGenericSearchProcessor tmaPriceRowFilterSearchProcessor)
-