Class JpaCustomizedPaymentRepository<D extends JpaPayment>

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

public class JpaCustomizedPaymentRepository<D extends JpaPayment> extends Object implements CustomizedPaymentRepository<D>, org.springframework.beans.factory.InitializingBean
  • Field Details

  • Constructor Details

    • JpaCustomizedPaymentRepository

      public JpaCustomizedPaymentRepository(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

    • afterPropertiesSet

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

      @Autowired @Lazy public void setRepository(PaymentRepository<D> repository)
    • findWithTransactionInManagementStates

      public org.springframework.data.domain.Page<D> findWithTransactionInManagementStates(List<String> transactionManagementStates, @Nullable org.springframework.data.domain.Pageable pageable, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Description copied from interface: CustomizedPaymentRepository
      Returns the payments that contain the transactions with the specified statuses.
      Specified by:
      findWithTransactionInManagementStates in interface CustomizedPaymentRepository<D extends JpaPayment>
      Parameters:
      transactionManagementStates - the transaction management states
      pageable - the requested page of results from the database
      context - context information related to multitenancy
      Returns:
      the payments that contain the transactions with the specified statuses
    • findByCustomerIdAndTenantId

      public org.springframework.data.domain.Page<D> findByCustomerIdAndTenantId(String customerId, String tenantId, @Nullable org.springframework.data.domain.Pageable pageable)
      Description copied from interface: CustomizedPaymentRepository
      Find a page of payments for the given customer id.
      Specified by:
      findByCustomerIdAndTenantId in interface CustomizedPaymentRepository<D extends JpaPayment>
      Parameters:
      customerId - the id of the payment's owning customer
      tenantId - The ID of the Tenant this registration belongs to.
      pageable - the requested page of results from the database
      Returns:
      a page of payments for the given owner type and id
    • findByContextIdAndTenantId

      public Optional<D> findByContextIdAndTenantId(String contextId, String tenantId)
      Description copied from interface: CustomizedPaymentRepository
      Finds the payment by the context id and tenant id, ignoring other context filtering like archival status.
      Specified by:
      findByContextIdAndTenantId in interface CustomizedPaymentRepository<D extends JpaPayment>
      Parameters:
      contextId - The context id of the payment
      tenantId - the tenant context of this payment
      Returns:
      the payment if found
    • getRepository

      protected PaymentRepository<D> getRepository()
    • getNarrowingHelper

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