Class DefaultOfferCodeDaoExtensionHandler

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

public class DefaultOfferCodeDaoExtensionHandler extends AbstractExtensionHandler implements OfferCodeDaoExtensionHandler
Default implementation of OfferCodeDaoExtensionHandler.
Author:
Kelly Tisdell
  • Constructor Details

    • DefaultOfferCodeDaoExtensionHandler

      public DefaultOfferCodeDaoExtensionHandler()
  • Method Details

    • createReadOfferCodeByCodeQuery

      public ExtensionResultStatusType createReadOfferCodeByCodeQuery(jakarta.persistence.EntityManager em, 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: