Interface CustomizedOrderFulfillmentRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable>
- All Known Subinterfaces:
JpaOrderFulfillmentRepository<D>,OrderFulfillmentRepository<D>
- All Known Implementing Classes:
JpaCustomizedOrderFulfillmentRepository
OrderFulfillment.- Author:
- Dima Myroniuk (dmyroniuk)
-
Method Summary
Modifier and TypeMethodDescriptionfindAllByOrderIdAndMatchingTenant(String orderId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Retrieves the order fulfillment matching the provided ID and the tenant fromContextInfoif present.findAllByOrderIdAndStatusAndMatchingTenant(String orderId, String status, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all of the orderOrderFulfillmentswhich are associated with the givenorderId, and the tenant fromContextInfoif present.findAllByOrderIdInAndExcludeFulfillmentItems(List<String> orderIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Retrieves the order fulfillments for the providedorderIds.findAllDistinctContextIds(int page, cz.jirutka.rsql.parser.ast.Node filters) Retrieves a list of unique order fulfillment context IDs no larger than page.org.springframework.data.domain.Page<D>findAllMatchingTenant(cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable pageable, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Retrieves the order fulfillment matching the query and the tenant fromContextInfoif present.findByContextIdAndMatchingTenant(String id, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Retrieves the order fulfillment matching the provided ID and the tenant fromContextInfoif present.findByContextIdAndStatusAndMatchingTenant(String contextId, String status, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads theOrderFulfillmentfor the givenidandstatus, and the tenant fromContextInfoif present.org.springframework.data.domain.Page<D>findPageByOrderIdAndMatchingTenant(String orderId, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable pageable, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Retrieves the order fulfillment matching the provided ID and the tenant fromContextInfoif present.
-
Method Details
-
findAllDistinctContextIds
@Policy(operationTypes=READ) List<String> findAllDistinctContextIds(int page, @NonNull cz.jirutka.rsql.parser.ast.Node filters) Retrieves a list of unique order fulfillment context IDs no larger than page. It is expected that any appropriate offset is achieved through criteria designated infilters.- Parameters:
page- the requested amount of results from the database. -1 indicates no limit.filters- additional filters to apply in the query. Should beEmptyNodeif no additional filters should be applied.- Returns:
- unique order fulfillment IDs
-
findByContextIdAndMatchingTenant
@Policy(operationTypes=READ) Optional<D> findByContextIdAndMatchingTenant(String id, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Retrieves the order fulfillment matching the provided ID and the tenant fromContextInfoif present.Differs from the standard narrowing behavior of
TrackableRepository.findByContextId(String, ContextInfo), which only returns tenant-level (non-application-associated) records when fetching from a tenant context. This implementation finds all records within the tenant regardless of whether they're associated to an application.- Parameters:
id- the id of the order fulfillment to findcontextInfo- context information surrounding multitenant state.- Returns:
- an
Optionalcontaining the requested order fulfillment if found within the tenant, orOptional.empty()otherwise
-
findAllByOrderIdAndMatchingTenant
@Policy(operationTypes=READ) List<D> findAllByOrderIdAndMatchingTenant(String orderId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Retrieves the order fulfillment matching the provided ID and the tenant fromContextInfoif present.Differs from the standard narrowing behavior of
OrderFulfillmentRepository.findAllByOrderId(String, ContextInfo), which only returns tenant-level (non-application-associated) records when fetching from a tenant context. This implementation finds all records within the tenant regardless of whether they're associated to an application.- Parameters:
orderId- The ID of the order to find fulfillments forcontextInfo- context information surrounding multitenant state- Returns:
- the fulfillments that are associated with the given
orderId
-
findPageByOrderIdAndMatchingTenant
@Policy(operationTypes=READ) org.springframework.data.domain.Page<D> findPageByOrderIdAndMatchingTenant(String orderId, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable pageable, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Retrieves the order fulfillment matching the provided ID and the tenant fromContextInfoif present.Differs from the standard narrowing behavior of
OrderFulfillmentRepository.findAllByOrderId(String, ContextInfo), which only returns tenant-level (non-application-associated) records when fetching from a tenant context. This implementation finds all records within the tenant regardless of whether they're associated to an application.- Parameters:
orderId- The ID of the order to find fulfillments forcontextInfo- context information surrounding multitenant state- Returns:
- the fulfillments that are associated with the given
orderId
-
findAllMatchingTenant
@Policy(operationTypes=READ) org.springframework.data.domain.Page<D> findAllMatchingTenant(cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable pageable, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Retrieves the order fulfillment matching the query and the tenant fromContextInfoif present.Differs from the standard narrowing behavior of
TrackableRsqlFilterExecutor.findAll(Node, Pageable, ContextInfo), which only returns tenant-level (non-application-associated) records when fetching from a tenant context. This implementation finds all records within the tenant regardless of whether they're associated to an application.- Parameters:
filters- the RSQLNodeused to restrict result, must not be nullpageable- may bePageable.unpaged(), must not be null.contextInfo- context information surrounding multitenant state.- Returns:
- The subset (page) of narrowed entities
-
findAllByOrderIdInAndExcludeFulfillmentItems
List<D> findAllByOrderIdInAndExcludeFulfillmentItems(List<String> orderIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Retrieves the order fulfillments for the providedorderIds. This method avoids eagerly fetching the associatedOrderFulfillmentItems.- Parameters:
orderIds- the order idscontextInfo- context information surrounding multitenant state- Returns:
- the fulfillments that are associated with the given
orderIds
-
findAllByOrderIdAndStatusAndMatchingTenant
@Policy(operationTypes=READ) List<D> findAllByOrderIdAndStatusAndMatchingTenant(String orderId, String status, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all of the orderOrderFulfillmentswhich are associated with the givenorderId, and the tenant fromContextInfoif present.Differs from the standard narrowing behavior of
OrderFulfillmentRepository.findAllByOrderIdAndStatus(String, String, ContextInfo), which only returns tenant-level (non-application-associated) records when fetching from a tenant context. This implementation finds all records within the tenant regardless of whether they're associated to an application.- Parameters:
orderId- The ID of the parentOrderstatus- TheOrderFulfillment.getStatus()contextInfo- context information surrounding sandboxing and multitenant state- Returns:
- the
OrderFulfillmentswhich are associated with the givenorderId
-
findByContextIdAndStatusAndMatchingTenant
@Policy(operationTypes=READ) Optional<D> findByContextIdAndStatusAndMatchingTenant(String contextId, String status, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads theOrderFulfillmentfor the givenidandstatus, and the tenant fromContextInfoif present.Differs from the standard narrowing behavior of
OrderFulfillmentRepository.findByContextIdAndStatus(String, String, ContextInfo), which only returns tenant-level (non-application-associated) records when fetching from a tenant context. This implementation finds all records within the tenant regardless of whether they're associated to an application.- Parameters:
contextId- The ID of theOrderFulfillmentstatus- TheOrderFulfillment.getStatus()contextInfo- context information surrounding sandboxing and multitenant state- Returns:
- Reads the
OrderFulfillmentfor the givenidandstatus.
-