Class JpaCustomizedPaymentTransactionRepository<D extends JpaPaymentTransaction>

java.lang.Object
com.broadleafcommerce.paymenttransaction.provider.jpa.repository.JpaCustomizedPaymentTransactionRepository<D>
All Implemented Interfaces:
CustomizedPaymentTransactionRepository<D>, org.springframework.beans.factory.InitializingBean

public class JpaCustomizedPaymentTransactionRepository<D extends JpaPaymentTransaction> extends Object implements CustomizedPaymentTransactionRepository<D>, org.springframework.beans.factory.InitializingBean
  • Field Details

  • Constructor Details

    • JpaCustomizedPaymentTransactionRepository

      public JpaCustomizedPaymentTransactionRepository(com.broadleafcommerce.data.tracking.core.TrackableBehaviorUtil behaviorUtil, com.broadleafcommerce.data.tracking.jpa.filtering.fetch.rsql.JpaFiltersCriteriaBuilder criteriaBuilder, com.broadleafcommerce.common.jpa.RepositoryEntityTypeManager typeManager)
  • Method Details

    • findAllByDateRecordedBeforeAndManagementStateIsNotIn

      public org.springframework.data.domain.Page<D> findAllByDateRecordedBeforeAndManagementStateIsNotIn(@NonNull @NonNull Instant date, @NonNull @NonNull List<String> transactionManagementStates, @Nullable org.springframework.data.domain.Pageable pageable, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Description copied from interface: CustomizedPaymentTransactionRepository
      Returns the transactions recorded before the the specified time, excluding those with the specified management states
      Specified by:
      findAllByDateRecordedBeforeAndManagementStateIsNotIn in interface CustomizedPaymentTransactionRepository<D extends JpaPaymentTransaction>
      Parameters:
      date - the date until which the transaction was recorded
      transactionManagementStates - the excluded management states for the transactions
      pageable - The requested page of results from the database.
      context - Request context information around sandbox and multitenant state
      Returns:
      the transactions excluding those with the specified management states
    • findTransactionsToReverse

      public org.springframework.data.domain.Page<D> findTransactionsToReverse(Duration reversalCandidateTtl, @Nullable org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Description copied from interface: CustomizedPaymentTransactionRepository
      Returns the payment transactions that are eligible for reverse. By default this method returns the transaction with DefaultTransactionStatuses.SUCCESS status, DefaultTransactionManagementStates.REVERSAL_CANDIDATE management state and that have not been updated within a specified duration.

      If the transaction management state is DefaultTransactionManagementStates.REQUIRES_REVERSAL the update time is not considered.

      Specified by:
      findTransactionsToReverse in interface CustomizedPaymentTransactionRepository<D extends JpaPaymentTransaction>
      Parameters:
      reversalCandidateTtl - the amount of time the payment transactions have not been updated and can be reversed
      page - The requested page of results from the database
      context - context information related to multitenancy
      Returns:
      the payment transactions that are eligible for reversal
      See Also:
    • afterPropertiesSet

      public void afterPropertiesSet()
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
    • setRepository

      @Autowired @Lazy public void setRepository(PaymentTransactionRepository<D> repository)
    • getRepository

      protected PaymentTransactionRepository<D> getRepository()
    • getNarrowingHelper

      protected com.broadleafcommerce.data.tracking.jpa.filtering.narrow.JpaNarrowingHelper getNarrowingHelper()