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

All Known Subinterfaces:
JpaPriceDataUsageDetailRepository<D>, PriceDataUsageDetailRepository<D>
All Known Implementing Classes:
JpaCustomizedPriceDataUsageDetailRepository

public interface CustomizedPriceDataUsageDetailRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable>
Custom repository methods for PriceDataUsageDetail
Author:
karanjariwala
  • Method Details

    • findAllByRevertibleAndUsageDateBefore

      @Policy(operationTypes=READ) org.springframework.data.domain.Page<D> findAllByRevertibleAndUsageDateBefore(Instant usageDateBefore, @Nullable org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Fetches a page of PriceDataUsageDetail that are "revertible"(revertible=true) and before the specified date
      Parameters:
      usageDateBefore - - the date(instant) before usageDate
      page - - page info
      contextInfo - - the context info
      Returns:
      the page of PriceDataUsageDetail
    • archiveAllByIds

      @Policy(operationTypes=DELETE) void archiveAllByIds(Collection<String> priceDataUsageDetailIds, String archivalReason, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Archive multiple PriceDataUsageDetails by ids.
      Parameters:
      priceDataUsageDetailIds - the ids of priceDataUsageDetail to archival
      archivalReason - the reason for archival
      contextInfo - the context info
      See Also:
    • updateRevertibleByReferenceId

      @Policy(operationTypes=UPDATE) void updateRevertibleByReferenceId(String transactionReferenceType, String transactionReferenceId, Boolean revertible, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    • markRevertibleAllByIds

      @Policy(operationTypes=UPDATE) void markRevertibleAllByIds(Collection<String> priceDataUsageDetailIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    • deletePriceDataUsageDetailsOlderThan

      @Policy(operationTypes=DELETE) int deletePriceDataUsageDetailsOlderThan(Instant dateBefore, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Deletes all PriceDataUsageDetails whose PriceDataUsageDetail.getUsageDate() is older than dateBefore.

      Used for cleanup of obsolete data

      Parameters:
      dateBefore - the time instant before which the records are to be deleted/purged
      contextInfo - the context info
      Returns:
      the number of records deleted