Class DefaultOfferCodeDaoExtensionHandler

java.lang.Object
org.broadleafcommerce.common.extension.AbstractExtensionHandler
org.broadleafcommerce.core.offer.dao.DefaultOfferCodeDaoExtensionHandler
All Implemented Interfaces:
org.broadleafcommerce.common.extension.ExtensionHandler, OfferCodeDaoExtensionHandler

public class DefaultOfferCodeDaoExtensionHandler extends org.broadleafcommerce.common.extension.AbstractExtensionHandler implements OfferCodeDaoExtensionHandler
Default implementation of OfferCodeDaoExtensionHandler.
Author:
Kelly Tisdell
  • Field Summary

    Fields inherited from class org.broadleafcommerce.common.extension.AbstractExtensionHandler

    enabled, priority
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.broadleafcommerce.common.extension.ExtensionResultStatusType
    createReadOfferCodeByCodeQuery(jakarta.persistence.EntityManager em, org.broadleafcommerce.common.extension.ExtensionResultHolder<jakarta.persistence.Query> resultHolder, String code, boolean cacheable, String cacheRegion)
    This allows for an alternative, or non-default query to be created / used to find an offer code by a code string.

    Methods inherited from class org.broadleafcommerce.common.extension.AbstractExtensionHandler

    getPriority, isEnabled, setEnabled, setPriority

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface org.broadleafcommerce.common.extension.ExtensionHandler

    getPriority, isEnabled
  • Constructor Details

    • DefaultOfferCodeDaoExtensionHandler

      public DefaultOfferCodeDaoExtensionHandler()
  • Method Details

    • createReadOfferCodeByCodeQuery

      public org.broadleafcommerce.common.extension.ExtensionResultStatusType createReadOfferCodeByCodeQuery(jakarta.persistence.EntityManager em, org.broadleafcommerce.common.extension.ExtensionResultHolder<jakarta.persistence.Query> resultHolder, String code, boolean cacheable, String cacheRegion)
      Description copied from interface: OfferCodeDaoExtensionHandler
      This allows for an alternative, or non-default query to be created / used to find an offer code by a code string. An implementor may wish to use a different named query, or add a filter. Implementors MUST return one of: ExtensionResultStatusType.HANDLED, ExtensionResultStatusType.HANDLED_STOP, or ExtensionResultStatusType.NOT_HANDLED.

      ExtensionResultStatusType.HANDLED or ExtensionResultStatusType.HANDLED_STOP is returned, the resultHolder must be set with a valid instance of jakarta.persistence.Query. The cacheable and cacheRegion properties are hints and may be ignored by the implementor.

      Specified by:
      createReadOfferCodeByCodeQuery in interface OfferCodeDaoExtensionHandler
      Returns: