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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterPropertiesSet()
List<String>
findAllDistinctContextIds(int page, cz.jirutka.rsql.parser.ast.Node filters)
Retrieves a list of unique customer context IDs no larger than page.Stream<D>
readCustomersPagingStream(cz.jirutka.rsql.parser.ast.Node filters, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Reads all customers matching the given filters.void
setRepository(CustomerRepository<?> repository)
void
validate()
-
-
-
Constructor Detail
-
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 Detail
-
afterPropertiesSet
public void afterPropertiesSet() throws Exception
- Specified by:
afterPropertiesSet
in interfaceorg.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 infilters
.- Specified by:
findAllDistinctContextIds
in interfaceCustomizedCustomerRepository<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 beEmptyNode
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 interfaceCustomizedCustomerRepository<D extends JpaCustomer>
- Parameters:
filters
- additional filters to apply in the querycontextInfo
- 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)
-
-