Class JpaCustomizedCustomerRepository<D extends JpaCustomer>

java.lang.Object
com.broadleafcommerce.customer.provider.jpa.repository.JpaCustomizedCustomerRepository<D>
All Implemented Interfaces:
CustomizedCustomerRepository<D>, org.springframework.beans.factory.InitializingBean

public class JpaCustomizedCustomerRepository<D extends JpaCustomer> extends Object implements CustomizedCustomerRepository<D>, org.springframework.beans.factory.InitializingBean
  • Constructor Summary

    Constructors
    Constructor
    Description
    JpaCustomizedCustomerRepository(List<com.broadleafcommerce.data.tracking.core.service.RsqlQueryTransformer> rsqlQueryTransformers, com.broadleafcommerce.data.tracking.jpa.filtering.fetch.rsql.JpaCriteriaBuilderRsqlVisitor rsqlVisitor, com.broadleafcommerce.common.jpa.RepositoryEntityTypeManager repositoryEntityTypeManager, com.broadleafcommerce.data.tracking.core.TrackableBehaviorUtil behaviorUtil, com.broadleafcommerce.data.tracking.jpa.filtering.fetch.rsql.JpaFiltersCriteriaBuilder criteriaBuilder)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    findAllDistinctContextIds(int page, cz.jirutka.rsql.parser.ast.Node filters)
    Retrieves a list of unique customer context IDs no larger than page.
    readCustomersPagingStream(cz.jirutka.rsql.parser.ast.Node filters, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Reads all customers matching the given filters.
    void
     
    void
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • JpaCustomizedCustomerRepository

      public JpaCustomizedCustomerRepository(List<com.broadleafcommerce.data.tracking.core.service.RsqlQueryTransformer> rsqlQueryTransformers, com.broadleafcommerce.data.tracking.jpa.filtering.fetch.rsql.JpaCriteriaBuilderRsqlVisitor rsqlVisitor, com.broadleafcommerce.common.jpa.RepositoryEntityTypeManager repositoryEntityTypeManager, com.broadleafcommerce.data.tracking.core.TrackableBehaviorUtil behaviorUtil, com.broadleafcommerce.data.tracking.jpa.filtering.fetch.rsql.JpaFiltersCriteriaBuilder criteriaBuilder)
  • Method Details

    • afterPropertiesSet

      public void afterPropertiesSet() throws Exception
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Throws:
      Exception
    • findAllDistinctContextIds

      public List<String> findAllDistinctContextIds(int page, @NonNull cz.jirutka.rsql.parser.ast.Node filters)
      Description copied from interface: CustomizedCustomerRepository
      Retrieves a list of unique customer context IDs no larger than page. It is expected that any appropriate offset is achieved through criteria designated in filters.
      Specified by:
      findAllDistinctContextIds in interface CustomizedCustomerRepository<D extends JpaCustomer>
      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 customer IDs
    • readCustomersPagingStream

      public Stream<D> readCustomersPagingStream(@Nullable cz.jirutka.rsql.parser.ast.Node filters, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Description copied from interface: CustomizedCustomerRepository
      Reads all customers matching the given filters. In case filters are empty, all customers are returned.
      Specified by:
      readCustomersPagingStream in interface CustomizedCustomerRepository<D extends JpaCustomer>
      Parameters:
      filters - additional filters to apply in the query
      contextInfo - Request context information around sandbox and multitenant state
      Returns:
      the customers matching the given filters
    • validate

      @PostConstruct public void validate()
    • setRepository

      @Autowired @Lazy public void setRepository(CustomerRepository<?> repository)