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 Summary
Modifier and TypeMethodDescriptionvoid
archiveAllByIds
(Collection<String> priceDataUsageDetailIds, String archivalReason, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Archive multiplePriceDataUsageDetails
by ids.int
deletePriceDataUsageDetailsOlderThan
(Instant dateBefore, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deletes allPriceDataUsageDetails
whosePriceDataUsageDetail.getUsageDate()
is older thandateBefore
.org.springframework.data.domain.Page<D>
findAllByRevertibleAndUsageDateBefore
(Instant usageDateBefore, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Fetches a page ofPriceDataUsageDetail
that are "revertible"(revertible=true) and before the specified datevoid
markRevertibleAllByIds
(Collection<String> priceDataUsageDetailIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) void
updateRevertibleByReferenceId
(String transactionReferenceType, String transactionReferenceId, Boolean revertible, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
-
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 ofPriceDataUsageDetail
that are "revertible"(revertible=true) and before the specified date- Parameters:
usageDateBefore
- - the date(instant) before usageDatepage
- - page infocontextInfo
- - 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 multiplePriceDataUsageDetails
by ids.- Parameters:
priceDataUsageDetailIds
- the ids of priceDataUsageDetail to archivalarchivalReason
- the reason for archivalcontextInfo
- the context info- See Also:
-
updateRevertibleByReferenceId
-
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 allPriceDataUsageDetails
whosePriceDataUsageDetail.getUsageDate()
is older thandateBefore
.Used for cleanup of obsolete data
- Parameters:
dateBefore
- the time instant before which the records are to be deleted/purgedcontextInfo
- the context info- Returns:
- the number of records deleted
-