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

All Known Subinterfaces:
JpaProductRepository<D>, ProductRepository<D>
All Known Implementing Classes:
JpaCustomizedProductRepository

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

    Modifier and Type
    Method
    Description
    void
    executeSimpleTagPropagationUpdate(com.broadleafcommerce.data.tracking.core.transition.propagation.hierarchy.fieldupdate.FieldUpdatePropagatorInput fieldUpdatePropagatorInput, com.broadleafcommerce.data.tracking.core.transition.propagation.hierarchy.fieldupdate.FieldUpdatePropagatorOutput fieldUpdatePropagatorOutput)
    Execute a propagation update for Product.getTags().
    boolean
    existsByBusinessType(String businessType, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    Checks whether any Products exist that use the given BusinessType typeKey.
    org.springframework.data.domain.Page<D>
    findAllByCategoryContextId(String categoryContextId, Boolean isSorted, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Finds all products in a given category.
    org.springframework.data.domain.Page<D>
    findAllByCategoryContextIdAndSortType(String categoryContextId, String sortType, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Finds all products in a given category and sorts them by the given sort type.
    findAllByContextIdAndInheritanceLine(Iterable<String> contextIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Finds all products by context id for a given catalog inheritance line
    findAllByContextIdIn(Iterable<String> contextIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Finds all of the products with matching contextIds.
    findAllByContextIdNotIn(Collection<String> exclusions, cz.jirutka.rsql.parser.ast.Node filters, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Finds all of the products matching the given filters, excluding any products whose IDs match a value in exclusions.
    findAllByUriIn(Iterable<String> uris, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Finds all of the products with matching uris.
    findAllDistinctContextId(int page, cz.jirutka.rsql.parser.ast.Node filters)
    Retrieves a list of unique product context IDs no larger than page.
    findAllDistinctContextIdPerContext(int page, cz.jirutka.rsql.parser.ast.Node filters, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    Retrieves a narrowed list of unique product context IDs narrowed on a ContextInfo and no larger than page.
    findAllDistinctContextIdPerContextWithOptionalStipulations(cz.jirutka.rsql.parser.ast.Node filters, ProductStipulations stipulations, int pageSize, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    Retrieves a list of unique product context IDs narrowed on a ContextInfo and no larger than page.
    org.springframework.data.domain.Page<D>
    findAllWithSortType(String sortType, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Finds all products and sorts them by the given sort type.
    long
    findProductCountUsingReferencedOptionTemplate(String optionTemplateId, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    Returns the count of products that have ProductOption that is isAddedByReference with the given option template ID.
    boolean
    Whether Product.getTags() is a valid simple propagatable field.
  • Method Details

    • findAllDistinctContextId

      List<String> findAllDistinctContextId(int page, @NonNull cz.jirutka.rsql.parser.ast.Node filters)
      Retrieves a list of unique product 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 product IDs
    • findAllDistinctContextIdPerContext

      List<String> findAllDistinctContextIdPerContext(int page, @NonNull cz.jirutka.rsql.parser.ast.Node filters, @NonNull com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Retrieves a narrowed list of unique product context IDs narrowed on a ContextInfo and 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.
      context - The context used to help narrowing. For example, narrowing results to a particular catalog.
      Returns:
      The narrowed list of unique product context IDs
    • findAllDistinctContextIdPerContextWithOptionalStipulations

      List<String> findAllDistinctContextIdPerContextWithOptionalStipulations(@NonNull cz.jirutka.rsql.parser.ast.Node filters, @Nullable ProductStipulations stipulations, int pageSize, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Retrieves a list of unique product context IDs narrowed on a ContextInfo and no larger than page. It is expected that any appropriate offset is achieved through criteria designated in filters.
      Parameters:
      filters - additional filters to apply in the query. Should be EmptyNode if no additional filters should be applied.
      stipulations - Additional filtering context to be applied during product fetch. Stipulations are applied as a set of OR conditions, and any match of any of the stipulations designates a match for this set of conditions. Optional.
      pageSize - the requested amount of results from the database. -1 indicates no limit.
      context - The context used to help narrowing. For example, narrowing results to a particular catalog.
      Returns:
      The narrowed list of unique product context IDs
    • findAllByContextIdNotIn

      @Policy(operationTypes=READ) Stream<D> findAllByContextIdNotIn(@NonNull Collection<String> exclusions, @NonNull cz.jirutka.rsql.parser.ast.Node filters, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Finds all of the products matching the given filters, excluding any products whose IDs match a value in exclusions.
      Parameters:
      exclusions - a list of context IDs of products which should be excluded from the results
      filters - additional filters to apply in the query. Should be EmptyNode if no additional filters should be applied.
      contextInfo - context information around sandboxing and multitenant state
      Returns:
      all of the products matching the given filters, excluding any products whose IDs match a value in exclusions
    • findAllByContextIdIn

      @Policy(operationTypes=READ) List<D> findAllByContextIdIn(@NonNull Iterable<String> contextIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Finds all of the products with matching contextIds.
      Parameters:
      contextIds - The contextIds to match
      contextInfo - Request context information around sandbox and multitenant state
      Returns:
      All of the products with matching contextIds.
    • findAllByUriIn

      @Policy(operationTypes=READ) List<D> findAllByUriIn(@NonNull Iterable<String> uris, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Finds all of the products with matching uris.
      Parameters:
      uris - The URIs to match
      contextInfo - Request context information around sandbox and multitenant state
      Returns:
      All of the products with matching uris.
    • findAllByCategoryContextId

      @Policy(operationTypes=READ) org.springframework.data.domain.Page<D> findAllByCategoryContextId(@NonNull String categoryContextId, @Nullable Boolean isSorted, @Nullable cz.jirutka.rsql.parser.ast.Node filters, @NonNull org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Finds all products in a given category.
      Parameters:
      categoryContextId - the context id of the category.
      isSorted - – Whether to return CategoryProducts where CategoryProduct.sorted is true, else false.
      filters - additional filters to apply in the query. Should be EmptyNode if no additional filters should be applied.
      page - the requested amount of results from the database. -1 indicates no limit.
      contextInfo - Request context information around sandbox and multitenant state
      Returns:
      All the products in the given category
    • findAllByCategoryContextIdAndSortType

      @Policy(operationTypes=READ) org.springframework.data.domain.Page<D> findAllByCategoryContextIdAndSortType(@NonNull String categoryContextId, @NonNull String sortType, @NonNull cz.jirutka.rsql.parser.ast.Node filters, @NonNull org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Finds all products in a given category and sorts them by the given sort type.
      Parameters:
      categoryContextId - the context id of the category.
      sortType - the sort type to use.
      filters - additional filters to apply in the query. Should be EmptyNode if no additional
      page - the requested amount of results from the database. -1 indicates no limit.
      contextInfo - Request context information around sandbox and multitenant state
      Returns:
      All the products in the given category
    • findAllWithSortType

      @Policy(operationTypes=READ) org.springframework.data.domain.Page<D> findAllWithSortType(@NonNull String sortType, @NonNull cz.jirutka.rsql.parser.ast.Node filters, @NonNull org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Finds all products and sorts them by the given sort type.
      Parameters:
      sortType - the sort type to use.
      filters - additional filters to apply in the query. Should be EmptyNode if no additional
      page - the requested amount of results from the database. -1 indicates no limit.
      contextInfo - Request context information around sandbox and multitenant state
      Returns:
      All products sorted by sort type
    • existsByBusinessType

      @Policy(operationTypes=READ) boolean existsByBusinessType(@NonNull String businessType, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Checks whether any Products exist that use the given BusinessType typeKey.
      Parameters:
      businessType - The BusinessType.getTypeKey() to match with.
      context - Additional multitenant and sandbox information.
      Returns:
      Whether any Products exist that use the given typeKey.
      Since:
      Catalog Service 2.2.2, Release Train 2.2.2
    • findProductCountUsingReferencedOptionTemplate

      @Policy(operationTypes=READ) long findProductCountUsingReferencedOptionTemplate(@NonNull String optionTemplateId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Returns the count of products that have ProductOption that is isAddedByReference with the given option template ID.

      This is useful for validation purposes to prevent deletion of an option template that is in use.

      Parameters:
      optionTemplateId - the option template ID to check for references
      context - the context information surrounding sandboxing and multitenant state
      Returns:
      the count of products that reference the given option template ID
    • findAllByContextIdAndInheritanceLine

      @Policy(operationTypes=READ) List<D> findAllByContextIdAndInheritanceLine(@NonNull Iterable<String> contextIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Finds all products by context id for a given catalog inheritance line
      Parameters:
      contextIds - the context ids to find
      contextInfo - the information surrounding sandboxing and multitenant state, used to determine the catalog inheritance line
      Returns:
      All products by context id for a given catalog inheritance line
    • isTagsASimplePropagatableField

      @Policy(operationTypes=READ) boolean isTagsASimplePropagatableField()
      Whether Product.getTags() is a valid simple propagatable field.
      Returns:
      true if Product.getTags() is a valid simple propagatable field, false otherwise
      Since:
      Catalog Services 2.3.0, Release Train 2.3.0
      See Also:
    • executeSimpleTagPropagationUpdate

      @Policy(operationTypes=UPDATE) void executeSimpleTagPropagationUpdate(com.broadleafcommerce.data.tracking.core.transition.propagation.hierarchy.fieldupdate.FieldUpdatePropagatorInput fieldUpdatePropagatorInput, com.broadleafcommerce.data.tracking.core.transition.propagation.hierarchy.fieldupdate.FieldUpdatePropagatorOutput fieldUpdatePropagatorOutput)
      Execute a propagation update for Product.getTags().
      Parameters:
      fieldUpdatePropagatorInput - input details about the propagation
      fieldUpdatePropagatorOutput - output details about the propagation. The implementation may populate information onto this object as needed.
      Since:
      Catalog Services 2.3.0, Release Train 2.3.0
      See Also: