Class JpaCustomizedOrderFulfillmentRepository<D extends JpaOrderFulfillment>
- java.lang.Object
- 
- com.broadleafcommerce.order.provider.jpa.repository.JpaCustomizedOrderFulfillmentRepository<D>
 
- 
- All Implemented Interfaces:
- CustomizedOrderFulfillmentRepository<D>
 
 public class JpaCustomizedOrderFulfillmentRepository<D extends JpaOrderFulfillment> extends Object implements CustomizedOrderFulfillmentRepository<D> - Author:
- Dima Myroniuk (dmyroniuk)
 
- 
- 
Constructor SummaryConstructors Constructor Description JpaCustomizedOrderFulfillmentRepository(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, JpaOrderTenantQueryHelper tenantQueryHelper)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.persistence.criteria.PredicatebuildOrderIdIsEqualToFilter(String orderId, Map<String,Object> queryParams, javax.persistence.criteria.CriteriaBuilder criteriaBuilder, javax.persistence.criteria.Root<? extends com.broadleafcommerce.data.tracking.core.Trackable> entity)List<D>findAllByOrderIdAndMatchingTenant(String orderId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Retrieves the order fulfillment matching the provided ID and the tenant fromContextInfoif present.List<String>findAllDistinctContextIds(int page, cz.jirutka.rsql.parser.ast.Node filters)Retrieves a list of unique order fulfillment context IDs no larger than page.org.springframework.data.domain.Page<D>findAllMatchingTenant(cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable pageable, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Retrieves the order fulfillment matching the query and the tenant fromContextInfoif present.Optional<D>findByContextIdAndMatchingTenant(String id, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Retrieves the order fulfillment matching the provided ID and the tenant fromContextInfoif present.voidsetRepository(OrderFulfillmentRepository<?> repository)voidvalidate()
 
- 
- 
- 
Constructor Detail- 
JpaCustomizedOrderFulfillmentRepositorypublic JpaCustomizedOrderFulfillmentRepository(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, JpaOrderTenantQueryHelper tenantQueryHelper) 
 
- 
 - 
Method Detail- 
validate@PostConstruct public void validate() 
 - 
findAllDistinctContextIdspublic List<String> findAllDistinctContextIds(int page, cz.jirutka.rsql.parser.ast.Node filters) Description copied from interface:CustomizedOrderFulfillmentRepositoryRetrieves a list of unique order fulfillment context IDs no larger than page. It is expected that any appropriate offset is achieved through criteria designated infilters.- Specified by:
- findAllDistinctContextIdsin interface- CustomizedOrderFulfillmentRepository<D extends JpaOrderFulfillment>
- Parameters:
- page- the requested amount of results from the database. -1 indicates no limit.
- filters- additional filters to apply in the query. Should be- EmptyNodeif no additional filters should be applied.
- Returns:
- unique order fulfillment IDs
 
 - 
setRepository@Autowired @Lazy public void setRepository(OrderFulfillmentRepository<?> repository) 
 - 
findByContextIdAndMatchingTenantpublic Optional<D> findByContextIdAndMatchingTenant(String id, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:CustomizedOrderFulfillmentRepositoryRetrieves the order fulfillment matching the provided ID and the tenant fromContextInfoif 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.- Specified by:
- findByContextIdAndMatchingTenantin interface- CustomizedOrderFulfillmentRepository<D extends JpaOrderFulfillment>
- Parameters:
- id- the id of the order fulfillment to find
- contextInfo- context information surrounding multitenant state.
- Returns:
- an Optionalcontaining the requested order fulfillment if found within the tenant, orOptional.empty()otherwise
 
 - 
findAllByOrderIdAndMatchingTenantpublic List<D> findAllByOrderIdAndMatchingTenant(String orderId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:CustomizedOrderFulfillmentRepositoryRetrieves the order fulfillment matching the provided ID and the tenant fromContextInfoif present.Differs from the standard narrowing behavior of OrderFulfillmentRepository.findAllByOrderId(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.- Specified by:
- findAllByOrderIdAndMatchingTenantin interface- CustomizedOrderFulfillmentRepository<D extends JpaOrderFulfillment>
- Parameters:
- orderId- The ID of the order to find fulfillments for
- contextInfo- context information surrounding multitenant state
- Returns:
- the fulfillments that are associated with the given orderId
 
 - 
buildOrderIdIsEqualToFilterpublic javax.persistence.criteria.Predicate buildOrderIdIsEqualToFilter(String orderId, Map<String,Object> queryParams, javax.persistence.criteria.CriteriaBuilder criteriaBuilder, javax.persistence.criteria.Root<? extends com.broadleafcommerce.data.tracking.core.Trackable> entity) 
 - 
findAllMatchingTenantpublic org.springframework.data.domain.Page<D> findAllMatchingTenant(cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable pageable, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:CustomizedOrderFulfillmentRepositoryRetrieves the order fulfillment matching the query and the tenant fromContextInfoif present.Differs from the standard narrowing behavior of TrackableRsqlFilterExecutor.findAll(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.- Specified by:
- findAllMatchingTenantin interface- CustomizedOrderFulfillmentRepository<D extends JpaOrderFulfillment>
- Parameters:
- filters- the RSQL- Nodeused to restrict result, must not be null
- pageable- may be- Pageable.unpaged(), must not be null.
- contextInfo- context information surrounding multitenant state.
- Returns:
- The subset (page) of narrowed entities
 
 
- 
 
-