Interface OrderNoteService<P extends OrderNote>

Type Parameters:
P - The projection domain type, a subtype of OrderNote
All Superinterfaces:
com.broadleafcommerce.data.tracking.core.service.CrudEntityService<P>, com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService<P>
All Known Implementing Classes:
DefaultOrderNoteService

public interface OrderNoteService<P extends OrderNote> extends com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService<P>
Service API for OrderNotes. Supported by OrderNoteRepository
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.data.domain.Page<P>
    readAllByOrderId(String orderId, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Retrieve notes for the given order ID.
    org.springframework.data.domain.Page<P>
    readAllByOrderIdAndMatchingTenant(String orderId, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Retrieve notes for the given order ID and the tenant from ContextInfo.
    readByContextIdAndMatchingTenant(String id, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    Retrieves the order note matching the provided ID and the tenant from ContextInfo if present.

    Methods inherited from interface com.broadleafcommerce.data.tracking.core.service.CrudEntityService

    create, createAll, createAllAllowingPartialSuccess, delete, readAll, readAll, readAll, readAllByContextId, readByContextId, replace, replaceAll, replaceAllAllowingPartialSuccess, update, updateAll, updateAllAllowingPartialSuccess, updateSort

    Methods inherited from interface com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService

    readAll, readAll, readAll, readAll
  • Method Details

    • readAllByOrderId

      @Policy(operationTypes=READ) org.springframework.data.domain.Page<P> readAllByOrderId(String orderId, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Retrieve notes for the given order ID.
      Parameters:
      orderId - the ID of the order to search for
      filters - additional filters to apply in the query. Should be EmptyNode if no additional filters should be applied.
      page - the requested page of results from the database
      contextInfo - context information around sandbox and multitenant state
      Returns:
      a page of the notes associated with the given order ID
    • readAllByOrderIdAndMatchingTenant

      @Policy(operationTypes=READ) org.springframework.data.domain.Page<P> readAllByOrderIdAndMatchingTenant(String orderId, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Retrieve notes for the given order ID and the tenant from ContextInfo.

      Differs from the standard narrowing behavior of OrderNoteRepository.findAllByOrderContextId(String, 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:
      orderId - the ID of the order to search for
      filters - additional filters to apply in the query. Should be EmptyNode if no additional filters should be applied.
      page - the requested page of results from the database
      contextInfo - context information around sandbox and multitenant state
      Returns:
      a page of the notes associated with the given order ID and tenant
    • readByContextIdAndMatchingTenant

      @Policy(operationTypes=READ) P readByContextIdAndMatchingTenant(@NonNull String id, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Retrieves the order note 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 note to find
      context - context information surrounding multitenant state.
      Returns:
      the requested order note if found within the tenant
      Throws:
      com.broadleafcommerce.data.tracking.core.exception.EntityMissingException - if no entity is found with the given id and tenant