Interface CustomizedOrderRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable>

All Known Subinterfaces:
JpaOrderRepository<D>, OrderRepository<D>
All Known Implementing Classes:
JpaCustomizedOrderRepository

public interface CustomizedOrderRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable>
Advanced functionality related to Order.
  • Method Summary

    Modifier and Type
    Method
    Description
    findAllByContextIdAndMatchingTenant(Iterable<String> contextIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Retrieves the orders matching the provided IDs and the tenant from ContextInfo if present.
    findAllDistinctContextIds(int page, cz.jirutka.rsql.parser.ast.Node filters)
    Retrieves a list of unique order context IDs no larger than page.
    findByContextIdAndMatchingTenant(String id, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Retrieves the order matching the provided ID and the tenant from ContextInfo if 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 context IDs no larger than page. It is expected that any appropriate offset is achieved through criteria designated in filters.
      Parameters:
      page - the requested amount of results from the database. -1 indicates no limit.
      filters - additional filters to apply in the query. Should be EmptyNode if no additional filters should be applied.
      Returns:
      unique order IDs
    • findByContextIdAndMatchingTenant

      @Policy(operationTypes=READ) Optional<D> findByContextIdAndMatchingTenant(String id, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Retrieves the order matching the provided ID and the tenant from ContextInfo if 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 find
      contextInfo - context information surrounding multitenant state.
      Returns:
      an Optional containing the requested order if found within the tenant, or Optional.empty() otherwise
    • findAllByContextIdAndMatchingTenant

      @Policy(operationTypes=READ) List<D> findAllByContextIdAndMatchingTenant(Iterable<String> contextIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Retrieves the orders matching the provided IDs and the tenant from ContextInfo if 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:
      contextIds - the ids of the orders to find
      contextInfo - context information surrounding multitenant state.
      Returns:
      The list of narrowed orders