Class DefaultDiscountService

  • All Implemented Interfaces:
    DiscountService, java.io.Serializable, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware

    public class DefaultDiscountService
    extends AbstractBusinessService
    implements DiscountService, org.springframework.context.ApplicationContextAware
    Default implementation of the DiscountService.
    See Also:
    Serialized Form
    • Constructor Detail

      • DefaultDiscountService

        public DefaultDiscountService()
    • Method Detail

      • getDiscountsForCode

        public java.util.Collection<DiscountModel> getDiscountsForCode​(java.lang.String matchedCode)
        Description copied from interface: DiscountService
        Gets all DiscountModels which match the specified code.
        Specified by:
        getDiscountsForCode in interface DiscountService
        Parameters:
        matchedCode - an SQL-Like statement as String, such as %discountCode%
        Returns:
        the Collection of all DiscountModels which match the specified code
      • setDiscountDao

        public void setDiscountDao​(DiscountDao discountDao)
      • setFindDiscountValuesStrategy

        public void setFindDiscountValuesStrategy​(FindDiscountValuesStrategy findDiscountValuesStrategy)
      • setApplicationContext

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

        public void afterPropertiesSet()
                                throws java.lang.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:
        java.lang.Exception
        See Also:
        InitializingBean.afterPropertiesSet()