Interface OfferAuditDetailService<P extends OfferAuditDetail>

  • All Superinterfaces:
    com.broadleafcommerce.data.tracking.core.service.CrudEntityService<P>, com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService<P>
    All Known Implementing Classes:
    DefaultOfferAuditDetailService

    public interface OfferAuditDetailService<P extends OfferAuditDetail>
    extends com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService<P>
    Author:
    Nathan Moore (nathanmoore).
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      Long countByOffer​(String offerId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Count all OfferAuditDetail records that relate to the provided offer id.
      Long countByOfferAndCode​(String offerId, String code, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Count all OfferAuditDetail records that relate to the provided offer id and code.
      Long countByOfferAndUser​(String offerId, UserTarget userTarget, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Count all OfferAuditDetail records that relate to the provided offer id and user target.
      Long countByOfferAndUserAndBetweenDates​(String offerId, UserTarget userTarget, Instant startDate, Instant endDate, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Count all OfferAuditDetail records that relate to the provided offer id and user target and that fall between the given dates.
      • Methods inherited from interface com.broadleafcommerce.data.tracking.core.service.CrudEntityService

        create, createAll, createAllAllowingPartialSuccess, delete, readAll, readAll, readAll, readAllByContextId, readByContextId, replace, replaceAll, replaceAllAllowingPartialSuccess, update, updateAll, updateAllAllowingPartialSuccess, updateSort
      • Methods inherited from interface com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService

        readAll, readAll, readAll, readAll
    • Method Detail

      • countByOffer

        Long countByOffer​(String offerId,
                          @Nullable
                          com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
        Count all OfferAuditDetail records that relate to the provided offer id.
        Parameters:
        offerId - The offer id to use to count related OfferAuditDetail records.
        contextInfo - context information around sandbox and multitenant state
        Returns:
        all OfferAuditDetail records that relate to the provided offer id.
      • countByOfferAndUser

        Long countByOfferAndUser​(String offerId,
                                 UserTarget userTarget,
                                 @Nullable
                                 com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
        Count all OfferAuditDetail records that relate to the provided offer id and user target.
        Parameters:
        offerId - The offer id to use to count related OfferAuditDetail records.
        userTarget - The user target to use to count related OfferAuditDetail records.
        contextInfo - context information around sandbox and multitenant state
        Returns:
        all OfferAuditDetail records that relate to the provided offer id and user target.
      • countByOfferAndCode

        Long countByOfferAndCode​(String offerId,
                                 String code,
                                 @Nullable
                                 com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
        Count all OfferAuditDetail records that relate to the provided offer id and code.
        Parameters:
        offerId - The offer id to use to count related OfferAuditDetail records.
        code - The code to use to count related OfferAuditDetail records
        contextInfo - context information around sandbox and multitenant state
        Returns:
        all OfferAuditDetail records that relate to the provided offer id and code.
      • countByOfferAndUserAndBetweenDates

        Long countByOfferAndUserAndBetweenDates​(String offerId,
                                                UserTarget userTarget,
                                                Instant startDate,
                                                Instant endDate,
                                                @Nullable
                                                com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
        Count all OfferAuditDetail records that relate to the provided offer id and user target and that fall between the given dates. Used to determine Offer.maxUsesPerUserFrequency.
        Parameters:
        offerId - The offer id to use to count related OfferAuditDetail records.
        userTarget - The user target to use to count related OfferAuditDetail records.
        startDate - The start Instant to count related records against
        endDate - The end Instant to count related records against
        contextInfo - context information around sandbox and multitenant state
        Returns:
        all OfferAuditDetail records that relate to the provided offer id and user between the given dates.