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 Summary
-
Constructor Summary
ConstructorDescriptionJpaCustomizedPaymentRepository
(com.broadleafcommerce.data.tracking.core.TrackableBehaviorUtil behaviorUtil, com.broadleafcommerce.data.tracking.jpa.filtering.fetch.rsql.JpaFiltersCriteriaBuilder criteriaBuilder, com.broadleafcommerce.common.jpa.RepositoryEntityTypeManager typeManager) -
Method Summary
Modifier and TypeMethodDescriptionvoid
findByContextIdAndTenantId
(String contextId, String tenantId) Finds the payment by the context id and tenant id, ignoring other context filtering like archival status.org.springframework.data.domain.Page<D>
findByCustomerIdAndTenantId
(String customerId, String tenantId, org.springframework.data.domain.Pageable pageable) Find a page of payments for the given customer id.org.springframework.data.domain.Page<D>
findWithTransactionInManagementStates
(List<String> transactionManagementStates, org.springframework.data.domain.Pageable pageable, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Returns the payments that contain the transactions with the specified statuses.protected com.broadleafcommerce.data.tracking.jpa.filtering.narrow.JpaNarrowingHelper
protected PaymentRepository<D>
void
setRepository
(PaymentRepository<D> repository)
-
Field Details
-
MANAGEMENT_STATE_FLD
- See Also:
-
-
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 interfaceorg.springframework.beans.factory.InitializingBean
-
setRepository
-
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 interfaceCustomizedPaymentRepository<D extends JpaPayment>
- Parameters:
transactionManagementStates
- the transaction management statespageable
- the requested page of results from the databasecontext
- 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 interfaceCustomizedPaymentRepository<D extends JpaPayment>
- Parameters:
customerId
- the id of the payment's owning customertenantId
- The ID of theTenant
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
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 interfaceCustomizedPaymentRepository<D extends JpaPayment>
- Parameters:
contextId
- The context id of the paymenttenantId
- the tenant context of this payment- Returns:
- the payment if found
-
getRepository
-
getNarrowingHelper
protected com.broadleafcommerce.data.tracking.jpa.filtering.narrow.JpaNarrowingHelper getNarrowingHelper()
-