Class TravelEurope1PriceFactory

java.lang.Object
de.hybris.platform.jalo.Manager
de.hybris.platform.jalo.extension.Extension
de.hybris.platform.jalo.order.price.AbstractPriceFactory
de.hybris.platform.europe1.jalo.GeneratedEurope1PriceFactory
de.hybris.platform.europe1.jalo.Europe1PriceFactory
de.hybris.platform.travelservices.jalo.TravelEurope1PriceFactory
All Implemented Interfaces:
de.hybris.platform.jalo.extension.ItemLifecycleListener, de.hybris.platform.jalo.order.price.PriceFactory, TravelPriceFactory, Serializable

public class TravelEurope1PriceFactory extends de.hybris.platform.europe1.jalo.Europe1PriceFactory implements TravelPriceFactory
Travel price factory for querying price rows and taxes for travel specific search criteria. The Europe1PriceFactory doesn't support changing the query patters or filtering and is designed to work only for hybris Products. The Travel accelerator extends the price factory class to provide additional methods required for travel sector.
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class de.hybris.platform.europe1.jalo.Europe1PriceFactory

    de.hybris.platform.europe1.jalo.Europe1PriceFactory.CachedTax, de.hybris.platform.europe1.jalo.Europe1PriceFactory.CachedTaxValue, de.hybris.platform.europe1.jalo.Europe1PriceFactory.DiscountRowMatchComparator, de.hybris.platform.europe1.jalo.Europe1PriceFactory.PriceRowInfoComparator, de.hybris.platform.europe1.jalo.Europe1PriceFactory.PriceRowMatchComparator, de.hybris.platform.europe1.jalo.Europe1PriceFactory.TaxRowMatchComparator

    Nested classes/interfaces inherited from class de.hybris.platform.jalo.extension.Extension

    de.hybris.platform.jalo.extension.Extension.RestrictedLanguagesProvider, de.hybris.platform.jalo.extension.Extension.RightsProvider

    Nested classes/interfaces inherited from class de.hybris.platform.jalo.Manager

    de.hybris.platform.jalo.Manager.GenericManagerSingletonCreator, de.hybris.platform.jalo.Manager.ManagerSingletonCreator
  • Field Summary

    Fields inherited from class de.hybris.platform.europe1.jalo.Europe1PriceFactory

    MATCH_ANY, MATCH_BY_PRODUCT_ID, USE_FAST_ALGORITHMS

    Fields inherited from class de.hybris.platform.europe1.jalo.GeneratedEurope1PriceFactory

    DEFAULT_INITIAL_ATTRIBUTES, PRODUCT2OWNEUROPE1DISCOUNTSOWNEUROPE1DISCOUNTSHANDLER, PRODUCT2OWNEUROPE1PRICESOWNEUROPE1PRICESHANDLER, PRODUCT2OWNEUROPE1TAXESOWNEUROPE1TAXESHANDLER, USER2OWNEUROPE1DISCOUNTSOWNEUROPE1DISCOUNTSHANDLER
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected List<de.hybris.platform.europe1.jalo.TaxRow>
    filterTaxRows4Price(Collection<de.hybris.platform.europe1.jalo.TaxRow> rows, Date date)
    Filters tax rows which do not match the given parameters.
     
    List<de.hybris.platform.jalo.order.price.PriceInformation>
    getProductPriceInformations(de.hybris.platform.jalo.product.Product product, Map<String,String> searchCriteria)
    Implement this to show all prices available for the given product and travel search criteria.
    Collection<de.hybris.platform.util.TaxValue>
    getTaxValues(de.hybris.platform.jalo.order.AbstractOrderEntry entry)
    Method overridden to set order currency in session context.
    protected de.hybris.platform.servicelayer.time.TimeService
     
    protected Collection<de.hybris.platform.europe1.jalo.PriceRow>
    queryPriceRows4Price(de.hybris.platform.jalo.SessionContext ctx, de.hybris.platform.jalo.product.Product product, de.hybris.platform.jalo.enumeration.EnumerationValue productGroup, de.hybris.platform.jalo.user.User user, de.hybris.platform.jalo.enumeration.EnumerationValue userGroup)
    Deprecated.
    since version 5.0 after deprecation of the equivalent superclass method
    protected Collection<de.hybris.platform.europe1.jalo.PriceRow>
    queryPriceRows4Price(de.hybris.platform.jalo.SessionContext ctx, de.hybris.platform.jalo.product.Product product, de.hybris.platform.jalo.enumeration.EnumerationValue productGroup, de.hybris.platform.jalo.user.User user, de.hybris.platform.jalo.enumeration.EnumerationValue userGroup, Date date, de.hybris.platform.jalo.c2l.Currency currency, boolean giveAwayMode)
    Runs the query to retrieve prices rows for product and travel search criteria.
    void
     
    void
    setTimeService(de.hybris.platform.servicelayer.time.TimeService timeService)
     
    protected Collection<de.hybris.platform.europe1.jalo.TaxRow>
    superQueryTax4Price(de.hybris.platform.jalo.SessionContext ctx, de.hybris.platform.jalo.product.Product product, de.hybris.platform.jalo.enumeration.EnumerationValue productGroup, de.hybris.platform.jalo.user.User user, de.hybris.platform.jalo.enumeration.EnumerationValue userGroup)
    Runs the query to retrieve tax rows for travel search criteria.

    Methods inherited from class de.hybris.platform.europe1.jalo.Europe1PriceFactory

    adjustDate, appendProductConditions, appendUserConditions, beforeItemCreation, checkAllDiscountRows, checkAllDiscountRows, checkAllGlobalDiscountRows, checkAllGlobalDiscountRows, checkAllPriceRows, checkAllPriceRows, checkAllTaxRows, checkAllTaxRows, checkBeforeItemRemoval, createDiscountRow, createDiscountRow, createEssentialData, createGlobalDiscountRow, createGlobalDiscountRow, createPriceRow, createPriceRow, createPriceRow, createPriceRow, createProductTaxGroup, createProjectData, createTaxRow, createTaxRow, createTaxRow, createUserPriceGroup, createUserTaxGroup, extractProductId, extractProductId, fillTaxCache, filterDiscountRows4Price, filterPriceRows, filterPriceRows4Info, filterPriceRows4Price, getAllPriceInformations, getBasePrice, getCachedTaxes, getCounterpartItem, getCounterpartItem, getCounterpartItem, getDiscountInformations, getDiscountValues, getDiscountValues, getEnumFromContextOrItem, getEnumFromGroups, getEurope1Discounts, getEurope1Discounts, getEurope1Discounts, getEurope1Discounts, getEurope1Prices, getEurope1Prices, getEurope1Taxes, getEurope1Taxes, getInstance, getPDG, getPDG, getPDTRowsQueryBuilderFor, getPPG, getPPG, getPriceInformations, getProductDiscountInformations, getProductDiscountRows, getProductDiscountRows, getProductDiscountRowsFast, getProductPriceInformations, getProductPriceRows, getProductPriceRows, getProductPriceRowsFast, getProductTaxGroup, getProductTaxInformations, getProductTaxRows, getProductTaxRows, getProductTaxRowsFast, getPTG, getPTG, getRealPartOfPriceRows, getSuperCachedTaxes, getTaxInformations, getUDG, getUDG, getUDG, getUPG, getUPG, getUPG, getUserGlobalDiscountRows, getUserPriceGroup, getUserTaxGroup, getUTG, getUTG, getUTG, init, invalidateTaxCache, isCachingTaxes, isCreatorDisabled, matchDiscountRows, matchPriceRowForPrice, matchPriceRowsForInfo, matchTaxRows, notifyItemRemoval, queryDiscounts4Price, queryTax4Price, removeRowsFor, removeRowsFor, removeRowsFor, removeRowsFor, removeRowsFor, removeRowsFor, removeRowsFor, setEurope1Discounts, setEurope1Discounts, setEurope1Discounts, setEurope1Discounts, setEurope1Prices, setEurope1Prices, setEurope1Taxes, setEurope1Taxes, setRetrieveChannelStrategy

    Methods inherited from class de.hybris.platform.europe1.jalo.GeneratedEurope1PriceFactory

    addToOwnEurope1Discounts, addToOwnEurope1Discounts, addToOwnEurope1Discounts, addToOwnEurope1Discounts, addToOwnEurope1Prices, addToOwnEurope1Prices, addToOwnEurope1Taxes, addToOwnEurope1Taxes, createDiscountRow, createDiscountRow, createGlobalDiscountRow, createGlobalDiscountRow, createPriceRow, createPriceRow, createTaxRow, createTaxRow, getDefaultAttributeModes, getEurope1PriceFactory_PDG, getEurope1PriceFactory_PDG, getEurope1PriceFactory_PDG, getEurope1PriceFactory_PDG, getEurope1PriceFactory_PPG, getEurope1PriceFactory_PPG, getEurope1PriceFactory_PPG, getEurope1PriceFactory_PPG, getEurope1PriceFactory_PTG, getEurope1PriceFactory_PTG, getEurope1PriceFactory_PTG, getEurope1PriceFactory_PTG, getEurope1PriceFactory_UDG, getEurope1PriceFactory_UDG, getEurope1PriceFactory_UDG, getEurope1PriceFactory_UDG, getEurope1PriceFactory_UPG, getEurope1PriceFactory_UPG, getEurope1PriceFactory_UPG, getEurope1PriceFactory_UPG, getEurope1PriceFactory_UTG, getEurope1PriceFactory_UTG, getEurope1PriceFactory_UTG, getEurope1PriceFactory_UTG, getName, getOwnEurope1Discounts, getOwnEurope1Discounts, getOwnEurope1Discounts, getOwnEurope1Discounts, getOwnEurope1Prices, getOwnEurope1Prices, getOwnEurope1Taxes, getOwnEurope1Taxes, getUserDiscountGroup, getUserDiscountGroup, getUserPriceGroup, getUserPriceGroup, getUserTaxGroup, getUserTaxGroup, removeFromOwnEurope1Discounts, removeFromOwnEurope1Discounts, removeFromOwnEurope1Discounts, removeFromOwnEurope1Discounts, removeFromOwnEurope1Prices, removeFromOwnEurope1Prices, removeFromOwnEurope1Taxes, removeFromOwnEurope1Taxes, setEurope1PriceFactory_PDG, setEurope1PriceFactory_PDG, setEurope1PriceFactory_PDG, setEurope1PriceFactory_PDG, setEurope1PriceFactory_PPG, setEurope1PriceFactory_PPG, setEurope1PriceFactory_PPG, setEurope1PriceFactory_PPG, setEurope1PriceFactory_PTG, setEurope1PriceFactory_PTG, setEurope1PriceFactory_PTG, setEurope1PriceFactory_PTG, setEurope1PriceFactory_UDG, setEurope1PriceFactory_UDG, setEurope1PriceFactory_UDG, setEurope1PriceFactory_UDG, setEurope1PriceFactory_UPG, setEurope1PriceFactory_UPG, setEurope1PriceFactory_UPG, setEurope1PriceFactory_UPG, setEurope1PriceFactory_UTG, setEurope1PriceFactory_UTG, setEurope1PriceFactory_UTG, setEurope1PriceFactory_UTG, setOwnEurope1Discounts, setOwnEurope1Discounts, setOwnEurope1Discounts, setOwnEurope1Discounts, setOwnEurope1Prices, setOwnEurope1Prices, setOwnEurope1Taxes, setOwnEurope1Taxes, setUserDiscountGroup, setUserDiscountGroup, setUserPriceGroup, setUserPriceGroup, setUserTaxGroup, setUserTaxGroup

    Methods inherited from class de.hybris.platform.jalo.order.price.AbstractPriceFactory

    getAllPriceInformations, getProductDiscountInformations, getProductPriceInformations, getProductTaxInformations, isNetUser

    Methods inherited from class de.hybris.platform.jalo.extension.Extension

    checkBeforeInitialization, createSampleData, getCreatorDescription, getCreatorName, getCreatorParameterDefault, getCreatorParameterNames, getCreatorParameterPossibleValues, getRemote, notifyInitializationEnd, notifyInitializationStart, onFirstSessionCreation, writeReplace

    Methods inherited from class de.hybris.platform.jalo.Manager

    afterItemCreation, destroy, extractNonRequiredRemoteFromItem, extractRequiredRemoteFromItem, getAllValuesSessionContext, getAttribute, getAttributeMap, getFirstItemByAttribute, getFirstItemByAttribute, getRemoteManagerClass, getSession, getSingletonManagerInstance, getTenant, getTransientObject, getTransientObjectMap, setAttribute, setTenant, setTransientObject, wrap

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface de.hybris.platform.jalo.order.price.PriceFactory

    getAllPriceInformations, getBasePrice, getDiscountValues, getDiscountValues, getProductDiscountInformations, getProductPriceInformations, getProductTaxInformations, isNetUser
  • Constructor Details

    • TravelEurope1PriceFactory

      public TravelEurope1PriceFactory()
  • Method Details

    • getTimeService

      protected de.hybris.platform.servicelayer.time.TimeService getTimeService()
      Returns:
      timeService
    • setTimeService

      public void setTimeService(de.hybris.platform.servicelayer.time.TimeService timeService)
      Parameters:
      timeService - the timeService to set
    • getPricingQueryStrategy

      protected TravelPricingQueryStrategy getPricingQueryStrategy()
    • setPricingQueryStrategy

      public void setPricingQueryStrategy(TravelPricingQueryStrategy pricingQueryStrategy)
      Parameters:
      pricingQueryStrategy -
    • getProductPriceInformations

      public List<de.hybris.platform.jalo.order.price.PriceInformation> getProductPriceInformations(de.hybris.platform.jalo.product.Product product, Map<String,String> searchCriteria) throws de.hybris.platform.jalo.order.price.JaloPriceFactoryException
      Description copied from interface: TravelPriceFactory
      Implement this to show all prices available for the given product and travel search criteria.
      Specified by:
      getProductPriceInformations in interface TravelPriceFactory
      Parameters:
      product - the product
      searchCriteria - the map with travel specific search criteria
      Returns:
      a list of PriceInformation objects
      Throws:
      de.hybris.platform.jalo.order.price.JaloPriceFactoryException - if price calculation error occured
    • queryPriceRows4Price

      @Deprecated protected Collection<de.hybris.platform.europe1.jalo.PriceRow> queryPriceRows4Price(de.hybris.platform.jalo.SessionContext ctx, de.hybris.platform.jalo.product.Product product, de.hybris.platform.jalo.enumeration.EnumerationValue productGroup, de.hybris.platform.jalo.user.User user, de.hybris.platform.jalo.enumeration.EnumerationValue userGroup)
      Deprecated.
      since version 5.0 after deprecation of the equivalent superclass method
      Runs the query to retrieve prices rows for product and travel search criteria. If there are no price rows returned, the default query to fetch the price rows is being invoked. Please note that this method may return more rows than allowed so make sure they're filtered afterwards!
      Overrides:
      queryPriceRows4Price in class de.hybris.platform.europe1.jalo.Europe1PriceFactory
      Parameters:
      ctx -
      product - the product to get prices for
      productGroup - the product group to get prices for
      user - the user to get prices for
      userGroup - the user price group to get prices for
      Throws:
      de.hybris.platform.jalo.order.price.JaloPriceFactoryException
    • queryPriceRows4Price

      protected Collection<de.hybris.platform.europe1.jalo.PriceRow> queryPriceRows4Price(de.hybris.platform.jalo.SessionContext ctx, de.hybris.platform.jalo.product.Product product, de.hybris.platform.jalo.enumeration.EnumerationValue productGroup, de.hybris.platform.jalo.user.User user, de.hybris.platform.jalo.enumeration.EnumerationValue userGroup, Date date, de.hybris.platform.jalo.c2l.Currency currency, boolean giveAwayMode)
      Runs the query to retrieve prices rows for product and travel search criteria. If there are no price rows returned, the default query to fetch the price rows is being invoked. This method overrides the superclass method introduced with Hybris Commerce Platform 6.7, keeping the previous travel accelerator functionality
      Overrides:
      queryPriceRows4Price in class de.hybris.platform.europe1.jalo.Europe1PriceFactory
      Parameters:
      ctx -
      product - the product to get prices for
      productGroup - the product group to get prices for
      user - the user to get prices for
      userGroup - the user price group to get prices for
      Throws:
      de.hybris.platform.jalo.order.price.JaloPriceFactoryException
    • getTaxValues

      public Collection<de.hybris.platform.util.TaxValue> getTaxValues(de.hybris.platform.jalo.order.AbstractOrderEntry entry) throws de.hybris.platform.jalo.order.price.JaloPriceFactoryException
      Method overridden to set order currency in session context. This currency will be used when filtering tax rows based on currency. Please note that hybris OOTB code for taxes doesn't handle filtering tax rows based on order currency (price rows implementation handles this though).
      Specified by:
      getTaxValues in interface de.hybris.platform.jalo.order.price.PriceFactory
      Overrides:
      getTaxValues in class de.hybris.platform.europe1.jalo.Europe1PriceFactory
      Parameters:
      entry -
      Returns:
      collection of TaxValues
      Throws:
      de.hybris.platform.jalo.order.price.JaloPriceFactoryException
    • superQueryTax4Price

      protected Collection<de.hybris.platform.europe1.jalo.TaxRow> superQueryTax4Price(de.hybris.platform.jalo.SessionContext ctx, de.hybris.platform.jalo.product.Product product, de.hybris.platform.jalo.enumeration.EnumerationValue productGroup, de.hybris.platform.jalo.user.User user, de.hybris.platform.jalo.enumeration.EnumerationValue userGroup)
      Runs the query to retrieve tax rows for travel search criteria.
      Overrides:
      superQueryTax4Price in class de.hybris.platform.europe1.jalo.Europe1PriceFactory
      Parameters:
      ctx -
      product - the product to get prices for
      productGroup - the product group to get prices for
      user - the user to get prices for
      userGroup - the user price group to get prices for
    • filterTaxRows4Price

      protected List<de.hybris.platform.europe1.jalo.TaxRow> filterTaxRows4Price(Collection<de.hybris.platform.europe1.jalo.TaxRow> rows, Date date)
      Filters tax rows which do not match the given parameters. This method has been Overridden to provide additional logic to filter on Currency as well as DateRange as filtering on Currency is not provided in the out of the box functionality. We require this additional filter as we are getting TaxRows for all Currencies and we are only interested in the TaxRows for the selected Currency.
      Overrides:
      filterTaxRows4Price in class de.hybris.platform.europe1.jalo.Europe1PriceFactory
      Parameters:
      rows - the query result rows
      date - the requested date