Interface CustomizedOfferAuditDetailRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable>

    • Method Detail

      • countByOfferIdAndUser

        @Policy(operationTypes=READ)
        Long countByOfferIdAndUser​(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.
      • countByOfferIdAndUserAndBetweenDates

        @Policy(operationTypes=READ)
        Long countByOfferIdAndUserAndBetweenDates​(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.