Class OfferAuditServiceImpl

java.lang.Object
org.broadleafcommerce.core.offer.service.OfferAuditServiceImpl
All Implemented Interfaces:
OfferAuditService

@Service("blOfferAuditService") public class OfferAuditServiceImpl extends Object implements OfferAuditService
Author:
Phillip Verheyden (phillipuniverse)
  • Field Details

  • Constructor Details

    • OfferAuditServiceImpl

      public OfferAuditServiceImpl()
  • Method Details

    • readAuditById

      public OfferAudit readAuditById(Long offerAuditId)
      Specified by:
      readAuditById in interface OfferAuditService
    • save

      @Transactional("blTransactionManager") public OfferAudit save(OfferAudit offerAudit)
      Description copied from interface: OfferAuditService
      Persists an audit record to the database
      Specified by:
      save in interface OfferAuditService
    • delete

      @Transactional("blTransactionManager") public void delete(OfferAudit offerAudit)
      Specified by:
      delete in interface OfferAuditService
    • create

      public OfferAudit create()
      Description copied from interface: OfferAuditService
      Creates a new offer audit
      Specified by:
      create in interface OfferAuditService
    • countUsesByCustomer

      public Long countUsesByCustomer(Order order, Long customerId, Long offerId)
      Description copied from interface: OfferAuditService
      Counts how many times the an offer has been used by a customer. This method will take into account if the Offer has already been applied to the Order so as not to prevent the Offer from applying to new items added to the Order by a CRS.
      Specified by:
      countUsesByCustomer in interface OfferAuditService
      Returns:
      number of times and offer has been used by a customer
    • countUsesByCustomer

      public Long countUsesByCustomer(Order order, Long customerId, Long offerId, Long minimumDaysPerUsage)
      Description copied from interface: OfferAuditService
      Counts how many times the an offer has been used by a customer (within the passed in number of days if provided). This method will take into account if the Offer has already been applied to the Order so as not to prevent the Offer from applying to new items added to the Order by a CRS.
      Specified by:
      countUsesByCustomer in interface OfferAuditService
      Returns:
      number of times and offer has been used by a customer
    • countUsesByAccount

      public Long countUsesByAccount(Order order, Long accountId, Long offerId, Long minimumDaysPerUsage)
      Description copied from interface: OfferAuditService
      Counts how many times the an offer has been used by an account This method will take into account if the Offer has already been applied to the Order so as not to prevent the Offer from applying to new items added to the Order by a CRS.
      Specified by:
      countUsesByAccount in interface OfferAuditService
      Returns:
      number of times and offer has been used by a customer
    • countUsesByCustomer

      @Deprecated public Long countUsesByCustomer(Long customerId, Long offerId)
      Deprecated.
      Description copied from interface: OfferAuditService
      Counts how many times the an offer has been used by a customer
      Specified by:
      countUsesByCustomer in interface OfferAuditService
      Returns:
      number of times and offer has been used by a customer
    • countOfferCodeUses

      public Long countOfferCodeUses(Order order, Long offerCodeId)
      Description copied from interface: OfferAuditService
      Counts how many times the given offer code has been used in the system. This method will take into account if the OfferCode has already been applied to the Order so as not to prevent the OfferCODE from applying to new items added to the Order by a CRS.
      Specified by:
      countOfferCodeUses in interface OfferAuditService
      Returns:
      number of times the offer code has been used
    • countOfferCodeUses

      @Deprecated public Long countOfferCodeUses(Long offerCodeId)
      Deprecated.
      Description copied from interface: OfferAuditService
      Counts how many times the given offer code has been used in the system
      Specified by:
      countOfferCodeUses in interface OfferAuditService
      Returns:
      number of times the offer code has been used
    • readOfferAuditsByOrderId

      public List<OfferAudit> readOfferAuditsByOrderId(Long orderId)
      Description copied from interface: OfferAuditService
      Read all audits by order id
      Specified by:
      readOfferAuditsByOrderId in interface OfferAuditService
      Returns: