Interface SharedCodeSummaryService<S extends SharedCodeAuditSummary>

All Known Implementing Classes:
DefaultSharedCodeSummaryService

public interface SharedCodeSummaryService<S extends SharedCodeAuditSummary>
  • Method Summary

    Modifier and Type
    Method
    Description
    createOrUpdateAndIncrement(String offerCodeId, String offerCode, javax.money.MonetaryAmount totalSavings, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    Create an instance of SharedCodeAuditSummary, or atomically update an existing one.
    void
    delete(String id, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    Perform a delete operation on the entity identified by the context id.
    readAll(com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    Read a list of narrowed instances in the form of the business instance.
    readAll(cz.jirutka.rsql.parser.ast.Node filters, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    Retrieve all domain instances using a structured query string to drive the query criteria.
    org.springframework.data.domain.Page<S>
    readAll(cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable pageable, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    Retrieve all domain instances using a structured query string to drive the query criteria.
    readAll(cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Sort sort, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    Retrieve all domain instances using a structured query string to drive the query criteria.
    org.springframework.data.domain.Page<S>
    readAll(cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Sort sort, org.springframework.data.domain.Pageable pageable, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    Retrieve all domain instances using a structured query string to drive the query criteria.
    org.springframework.data.domain.Page<S>
    readAll(org.springframework.data.domain.Pageable pageable, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    Read a page of narrowed instances in the form of the business instance.
    readAll(org.springframework.data.domain.Sort sort, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    Read a list of narrowed instances in the form of the business instance.
    readAllByContextId(Iterable<String> ids, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    Retrieve all business instances based on a list of context ids.
    readAllByOfferCodeIds(Set<String> offerCodeIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Retrieve all SharedCodeAuditSummary records that relate to the provided offer code IDs.
    readByContextId(String id, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    Read a single instance of an entity in the form of a business domain.
    readByOfferCodeId(String offerCodeId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Retrieve the SharedCodeAuditSummary record for the provided offer code ID.
  • Method Details

    • readAll

      List<S> readAll(@NonNull cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Sort sort, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Retrieve all domain instances using a structured query string to drive the query criteria. The filters string is parsed by an internal implementation and the result is added to the query before executing the fetch against the persistence store. See FilterParser for more information.

      This version also accepts a formatted sort string that declares the sorting characteristics for the query. See SortParser for more information.

      Parameters:
      filters - the RSQL Node used to restrict result, must not be null
      sort - The string containing the structured list of sorts to apply
      context - Request context information around sandbox and multitenant state
      Returns:
      The list of narrowed, sorted entities
    • readAll

      List<S> readAll(@NonNull cz.jirutka.rsql.parser.ast.Node filters, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Retrieve all domain instances using a structured query string to drive the query criteria. The filters string is parsed by an internal implementation and the result is added to the query before executing the fetch against the persistence store. See FilterParser for more information.
      Parameters:
      filters - the RSQL Node used to restrict result, must not be null
      context - Request context information around sandbox and multitenant state
      Returns:
      The list of narrowed, sorted entities
    • readAll

      org.springframework.data.domain.Page<S> readAll(@NonNull cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Sort sort, @NonNull org.springframework.data.domain.Pageable pageable, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Retrieve all domain instances using a structured query string to drive the query criteria. The filters string is parsed by an internal implementation and the result is added to the query before executing the fetch against the persistence store. See FilterParser for more information.

      This version also accepts a Sort to apply to the result set

      Parameters:
      filters - the RSQL Node used to restrict result, must not be null
      sort - sort to apply to the query
      pageable - may be Pageable.unpaged(), must not be null.
      context - Request context information around sandbox and multitenant state
      Returns:
      The subset (page) of narrowed entities
    • readAll

      org.springframework.data.domain.Page<S> readAll(@NonNull cz.jirutka.rsql.parser.ast.Node filters, @NonNull org.springframework.data.domain.Pageable pageable, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Retrieve all domain instances using a structured query string to drive the query criteria. The filters string is parsed by an internal implementation and the result is added to the query before executing the fetch against the persistence store. See FilterParser for more information.
      Parameters:
      filters - the RSQL Node used to restrict result, must not be null
      pageable - may be Pageable.unpaged(), must not be null.
      context - Request context information around sandbox and multitenant state
      Returns:
      The subset (page) of narrowed entities
    • readByContextId

      S readByContextId(@NonNull String id, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Read a single instance of an entity in the form of a business domain.
      Parameters:
      id - The context id for the entity. This is the id by which the business recognizes the item.
      context - Context information used to discriminate the correct version of an entity by context id when multiple verions may be available across sandboxes, catalogs and applications.
      Returns:
      The narrowed entity instance in the form of a business instance
      Throws:
      com.broadleafcommerce.data.tracking.core.exception.EntityMissingException - if no entity is found with the given id
    • readAllByContextId

      Iterable<S> readAllByContextId(@NonNull Iterable<String> ids, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Retrieve all business instances based on a list of context ids.
      Parameters:
      ids - A list of context ids for the entitys. This is the id by which the business recognizes the item.
      context - Context information used to discriminate the correct version of an entity by context id when multiple verions may be available across sandboxes, catalogs and applications.
      Returns:
      The narrowed iterable collection of data in the form of business instances
    • readAll

      org.springframework.data.domain.Page<S> readAll(@NonNull org.springframework.data.domain.Pageable pageable, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Read a page of narrowed instances in the form of the business instance.
      Parameters:
      pageable - The current page information
      context - Context information used to discriminate the correct version of an entity by context id when multiple verions may be available across sandboxes, catalogs and applications.
      Returns:
      The narrowed page of data in the form of business instances
    • readAll

      List<S> readAll(@Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Read a list of narrowed instances in the form of the business instance.
      Parameters:
      context - Context information used to discriminate the correct version of an entity by context id when multiple verions may be available across sandboxes, catalogs and applications.
      Returns:
      The narrowed list of data in the form of business instances
    • readAll

      List<S> readAll(@NonNull org.springframework.data.domain.Sort sort, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Read a list of narrowed instances in the form of the business instance. Also apply the given sort.
      Parameters:
      sort - The sort to be performed on the results
      context - Context information used to discriminate the correct version of an entity by context id when multiple verions may be available across sandboxes, catalogs and applications.
      Returns:
      The narrowed list of sorted data in the form of business instances
    • createOrUpdateAndIncrement

      S createOrUpdateAndIncrement(@NonNull String offerCodeId, String offerCode, @Nullable javax.money.MonetaryAmount totalSavings, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Create an instance of SharedCodeAuditSummary, or atomically update an existing one. This flow also will not end up creating duplicate summaries for the same offer.
      Parameters:
      offerCodeId - The id of the related offer
      offerCode - The string offer code of the related offer
      totalSavings - The total savings applied to record for this offer
      context - Any tenant related information for the request context
      Returns:
      The created or updated summary
    • delete

      void delete(@NonNull String id, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Perform a delete operation on the entity identified by the context id. This could result in an archival, or a raw delete, depending on the result of processing through DomainMapper.deleteMap(Object, ContextInfo).
      Parameters:
      id - The context id for the entity. This is the id by which the business recognizes the item.
      context - Context information used to discriminate the correct version of an entity by context id when multiple verions may be available across sandboxes, catalogs and applications.
      Throws:
      com.broadleafcommerce.data.tracking.core.exception.EntityMissingException - if no instance was found in the backing store corresponding to id
    • readAllByOfferCodeIds

      List<S> readAllByOfferCodeIds(@NonNull Set<String> offerCodeIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Retrieve all SharedCodeAuditSummary records that relate to the provided offer code IDs.
      Parameters:
      offerCodeIds - the list of offer code IDs to find summary records for
      contextInfo - the context to perform the operation in
      Returns:
      the SharedCodeAuditSummary records that relate to the provided offer code IDs
    • readByOfferCodeId

      @Nullable S readByOfferCodeId(String offerCodeId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Retrieve the SharedCodeAuditSummary record for the provided offer code ID.
      Parameters:
      offerCodeId - the offer code ID to find summary record for
      contextInfo - the context to perform the operation in
      Returns:
      the SharedCodeAuditSummary record that relates to the provided offer code ID