Interface CustomizedSubscriptionRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable>
- All Known Subinterfaces:
JpaSubscriptionRepository<D>,SubscriptionRepository<D>
- All Known Implementing Classes:
JpaCustomizedSubscriptionRepository
public interface CustomizedSubscriptionRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable>
-
Method Summary
Modifier and TypeMethodDescriptiondefault LongcountAllBySubscriptionStatus(String subscriptionStatus) Deprecated.countAllBySubscriptionStatus(String subscriptionStatus, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Countsubscriptionsmatching the subscriptionStatus.org.springframework.data.domain.Page<D>findAllByPriceData(String priceDataId, Set<String> statuses, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Find allsubscriptionsby priceDataId.default org.springframework.data.domain.Page<String>findAllBySubscriptionStatus(String subscriptionStatus, org.springframework.data.domain.Pageable pageable) Deprecated.findAllBySubscriptionStatusAndBillingOperationStatus(List<String> subscriptionStatus, Date nextBillDate, org.springframework.data.domain.Pageable pageable) org.springframework.data.domain.Page<D>findAllBySubscriptionStatusInAndNextBillDateBeforeOrNextStatusChangeDateBeforeOrEndOfTermDateBefore(List<String> subscriptionStatuses, Date dateToFilter, org.springframework.data.domain.Pageable pageable, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Find subscriptions within the following criteria: subscriptionStatus in the given list billing frequency isDefaultSubscriptionBillingFrequencyEnum.NON_RENEWINGOR theSubscription.getNextBillDate()is before or equal the given date OR theSubscription.getNextStatusChangeDate()is before or equal the given date OR theSubscription.getEndOfTermDate()is before or equal the given date lastBillingOperationStatus is null OR is eitherPaymentStatusEnum.SUCCESSorPaymentStatusEnum.ABORTEDNote that the last condition prevents subscriptions that are being processed by another subscription job to be picked up again.org.springframework.data.domain.Page<D>findAllBySubscriptionStatusInAndNextBillDateBeforeOrNullAndNextStatusChangeDateBefore(List<String> subscriptionStatuses, Date dateToFilter, org.springframework.data.domain.Pageable pageable, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Find subscriptions within the following criteria: subscriptionStatus in the given list billing frequency isDefaultSubscriptionBillingFrequencyEnum.NON_RENEWINGOR the nextBillDate before or equal the given date OR nextBillDate is null and the nextStatusChangeDate is before or equal the given date lastBillingOperationStatus is null OR is eitherPaymentStatusEnum.SUCCESSorPaymentStatusEnum.ABORTEDNote that the last condition prevents subscriptions that are being processed by another subscription job to be picked up again.findAllByUserRefAndSubscriptionItemsItemRefIn(String userRef, Collection<String> itemRefs) findAllByUserRefTypeAndUserRefAndActive(String userRefType, String userRef, boolean includeInactive, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Find allsubscriptionsby userId.findAllByUserRefTypeAndUserRefAndSubscriptionItemsItemRefIn(String userRefType, String userRef, Collection<String> itemRefs, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) findByMatchingSubscriptionSource(Subscription subscription, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Find aSubscriptionwith the source matching theSubscriptiongiven.org.springframework.data.domain.Page<String>findContextIdsBySubscriptionStatus(String subscriptionStatus, org.springframework.data.domain.Pageable pageable, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Retrieve contextIds ofsubscriptionsmatching the subscriptionStatuslistSubscriptions(@NotBlank String userId, boolean includeInactive) Deprecated.
-
Method Details
-
listSubscriptions
@Deprecated(since="1.0.0") @Policy(operationTypes=READ) default List<D> listSubscriptions(@NotBlank @NotBlank String userId, boolean includeInactive) Deprecated.Find allsubscriptionsby userId. Optionally include inactive subscriptions. -
findAllByUserRefTypeAndUserRefAndActive
@Policy(operationTypes=READ) List<D> findAllByUserRefTypeAndUserRefAndActive(String userRefType, String userRef, boolean includeInactive, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Find allsubscriptionsby userId. Optionally include inactive subscriptions. -
findAllBySubscriptionStatus
@Deprecated(since="1.0.0") @Policy(operationTypes=READ) default org.springframework.data.domain.Page<String> findAllBySubscriptionStatus(String subscriptionStatus, org.springframework.data.domain.Pageable pageable) Deprecated. -
findContextIdsBySubscriptionStatus
@Policy(operationTypes=READ) org.springframework.data.domain.Page<String> findContextIdsBySubscriptionStatus(String subscriptionStatus, org.springframework.data.domain.Pageable pageable, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Retrieve contextIds ofsubscriptionsmatching the subscriptionStatus -
findAllByPriceData
@Policy(operationTypes=READ) org.springframework.data.domain.Page<D> findAllByPriceData(String priceDataId, Set<String> statuses, org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Find allsubscriptionsby priceDataId.- Parameters:
priceDataId- The id of the priceData belonging to one or more of the containedSubscriptionIteminstances.statuses- Set of statuses to filter by.page- The page informationcontextInfo- Additional sandbox and multitenant info
-
countAllBySubscriptionStatus
@Deprecated(since="1.0.0") @Policy(operationTypes=READ) default Long countAllBySubscriptionStatus(String subscriptionStatus) Deprecated. -
countAllBySubscriptionStatus
@Policy(operationTypes=READ) Long countAllBySubscriptionStatus(String subscriptionStatus, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Countsubscriptionsmatching the subscriptionStatus. -
findAllBySubscriptionStatusAndBillingOperationStatus
-
findAllBySubscriptionStatusInAndNextBillDateBeforeOrNullAndNextStatusChangeDateBefore
@Policy(operationTypes=READ) org.springframework.data.domain.Page<D> findAllBySubscriptionStatusInAndNextBillDateBeforeOrNullAndNextStatusChangeDateBefore(List<String> subscriptionStatuses, Date dateToFilter, org.springframework.data.domain.Pageable pageable, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Find subscriptions within the following criteria:- subscriptionStatus in the given list
- billing frequency is
DefaultSubscriptionBillingFrequencyEnum.NON_RENEWINGOR the nextBillDate before or equal the given date OR nextBillDate is null and the nextStatusChangeDate is before or equal the given date - lastBillingOperationStatus is null OR is either
PaymentStatusEnum.SUCCESSorPaymentStatusEnum.ABORTEDNote that the last condition prevents subscriptions that are being processed by another subscription job to be picked up again.
-
findAllBySubscriptionStatusInAndNextBillDateBeforeOrNextStatusChangeDateBeforeOrEndOfTermDateBefore
@Policy(operationTypes=READ) org.springframework.data.domain.Page<D> findAllBySubscriptionStatusInAndNextBillDateBeforeOrNextStatusChangeDateBeforeOrEndOfTermDateBefore(List<String> subscriptionStatuses, Date dateToFilter, org.springframework.data.domain.Pageable pageable, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Find subscriptions within the following criteria:- subscriptionStatus in the given list
- billing frequency is
DefaultSubscriptionBillingFrequencyEnum.NON_RENEWINGOR theSubscription.getNextBillDate()is before or equal the given date OR theSubscription.getNextStatusChangeDate()is before or equal the given date OR theSubscription.getEndOfTermDate()is before or equal the given date - lastBillingOperationStatus is null OR is either
PaymentStatusEnum.SUCCESSorPaymentStatusEnum.ABORTEDNote that the last condition prevents subscriptions that are being processed by another subscription job to be picked up again.
-
findByMatchingSubscriptionSource
@Policy(operationTypes=READ) Optional<D> findByMatchingSubscriptionSource(Subscription subscription, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Find aSubscriptionwith the source matching theSubscriptiongiven. By default, this is based onSubscription.getSubscriptionSource(),Subscription.getSubscriptionSourceRef(),Subscription.getSecondarySourceType(), andSubscription.getSecondarySourceRef().- Parameters:
subscription- ASubscriptionfor which to find a matching source.
-
findAllByUserRefAndSubscriptionItemsItemRefIn
@Deprecated(since="1.0.0") @Policy(operationTypes=READ) default List<D> findAllByUserRefAndSubscriptionItemsItemRefIn(String userRef, Collection<String> itemRefs) -
findAllByUserRefTypeAndUserRefAndSubscriptionItemsItemRefIn
-
countAllBySubscriptionStatus(String, ContextInfo)instead