Class JpaCustomizedOfferAuditDetailRepository<D extends JpaOfferAuditDetail>
- java.lang.Object
-
- com.broadleafcommerce.promotion.offer.provider.jpa.repository.JpaCustomizedOfferAuditDetailRepository<D>
-
- All Implemented Interfaces:
CustomizedOfferAuditDetailRepository<D>,org.springframework.beans.factory.InitializingBean
public class JpaCustomizedOfferAuditDetailRepository<D extends JpaOfferAuditDetail> extends Object implements CustomizedOfferAuditDetailRepository<D>, org.springframework.beans.factory.InitializingBean
- Author:
- Chad Harchar (charchar)
-
-
Constructor Summary
Constructors Constructor Description JpaCustomizedOfferAuditDetailRepository(com.broadleafcommerce.data.tracking.core.TrackableBehaviorUtil behaviorUtil, com.broadleafcommerce.data.tracking.jpa.filtering.fetch.rsql.JpaFiltersCriteriaBuilder criteriaBuilder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterPropertiesSet()LongcountByOfferIdAndUser(String offerId, UserTarget userTarget, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Count allOfferAuditDetailrecords that relate to the provided offer id and user target.LongcountByOfferIdAndUserAndBetweenDates(String offerId, UserTarget userTarget, Instant startDate, Instant endDate, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Count allOfferAuditDetailrecords that relate to the provided offer id and user target and that fall between the given dates.
-
-
-
Method Detail
-
afterPropertiesSet
public void afterPropertiesSet()
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean
-
countByOfferIdAndUser
public Long countByOfferIdAndUser(String offerId, UserTarget userTarget, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Description copied from interface:CustomizedOfferAuditDetailRepositoryCount allOfferAuditDetailrecords that relate to the provided offer id and user target.- Specified by:
countByOfferIdAndUserin interfaceCustomizedOfferAuditDetailRepository<D extends JpaOfferAuditDetail>- Parameters:
offerId- The offer id to use to count relatedOfferAuditDetailrecords.userTarget- The user target to use to count relatedOfferAuditDetailrecords.contextInfo- context information around sandbox and multitenant state- Returns:
- all
OfferAuditDetailrecords that relate to the provided offer id and user target.
-
countByOfferIdAndUserAndBetweenDates
public Long countByOfferIdAndUserAndBetweenDates(String offerId, UserTarget userTarget, Instant startDate, Instant endDate, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Description copied from interface:CustomizedOfferAuditDetailRepositoryCount allOfferAuditDetailrecords that relate to the provided offer id and user target and that fall between the given dates. Used to determineOffer.maxUsesPerUserFrequency.- Specified by:
countByOfferIdAndUserAndBetweenDatesin interfaceCustomizedOfferAuditDetailRepository<D extends JpaOfferAuditDetail>- Parameters:
offerId- The offer id to use to count relatedOfferAuditDetailrecords.userTarget- The user target to use to count relatedOfferAuditDetailrecords.startDate- The startInstantto count related records againstendDate- The endInstantto count related records againstcontextInfo- context information around sandbox and multitenant state- Returns:
- all
OfferAuditDetailrecords that relate to the provided offer id and user between the given dates.
-
-