Class DefaultTaxService

All Implemented Interfaces:
TaxService, Serializable, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware

public class DefaultTaxService extends AbstractBusinessService implements TaxService, org.springframework.context.ApplicationContextAware
Default implementation of the TaxService.
See Also:
  • Constructor Details

    • DefaultTaxService

      public DefaultTaxService()
  • Method Details

    • getTaxForCode

      public TaxModel getTaxForCode(String code)
      Description copied from interface: TaxService
      Gets the TaxModel with the specified unique TaxModel.CODE.
      Specified by:
      getTaxForCode in interface TaxService
      Parameters:
      code - the tax code
      Returns:
      the found TaxModel with the specified code
    • getTaxesForCode

      public Collection<TaxModel> getTaxesForCode(String matchedCode)
      Description copied from interface: TaxService
      Gets all TaxModels which match the specified code.
      Specified by:
      getTaxesForCode in interface TaxService
      Parameters:
      matchedCode - an SQL-Like statement as String, such as %taxCode%
      Returns:
      the Collection of all TaxModels which match the specified code
    • getTaxInformation

      public List<TaxInformation> getTaxInformation(BaseCriteria baseCriteria) throws CalculationException
      Description copied from interface: TaxService
      Get taxes information TaxInformation for given criteria.
      Specified by:
      getTaxInformation in interface TaxService
      Parameters:
      baseCriteria - BaseCriteria
      Returns:
      the List of all TaxInformations which matching baseCriteria. If no matching discounts were found, an empty collection is returned.
      Throws:
      CalculationException - if error occurred
    • setTaxDao

      public void setTaxDao(TaxDao taxDao)
    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext ctx)
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
    • setFindTaxValuesStrategy

      public void setFindTaxValuesStrategy(FindTaxValuesStrategy findTaxValuesStrategy)
    • afterPropertiesSet

      public void afterPropertiesSet() throws Exception
      Description copied from class: AbstractService
      Invoked by a BeanFactory after it has set all bean properties supplied. Overwrite this method for adding/implementing additional code into the service. Important note: Please call always super.afterPropertiesSet() before or the java serialization won't work.
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Overrides:
      afterPropertiesSet in class AbstractService
      Throws:
      Exception
      See Also:
      • InitializingBean.afterPropertiesSet()