Interface CustomizedCartRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable>
-
- All Known Subinterfaces:
CartRepository<D>,JpaCartRepository<D>
- All Known Implementing Classes:
JpaCustomizedCartRepository
public interface CustomizedCartRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable>Advanced functionality related to cart maintenance and filtering.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description intdeleteAbandonedAnonymousCarts(Instant deletePoint, Collection<String> statuses, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Delete anonymous carts that have not been updated since the given date.org.springframework.data.domain.Page<D>findAllByStatusesAndCustomerId(Set<String> statuses, String customerId, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Finds all carts with the given status within the requested pageorg.springframework.data.domain.Page<D>findAllByStatusesAndCustomerIdAndAccountId(Set<String> statuses, String customerId, String accountId, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Finds all carts with the given status within the requested page.org.springframework.data.domain.Page<D>findAllByStatusesAndCustomerRefCustomerId(Set<String> statuses, String customerId, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Deprecated.List<D>findAllMatchingTenantByIds(List<String> ids, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Finds a list of the carts with the givenidsand matching the tenant from the givenContextInfo.Optional<D>findByStatusAndCustomerId(String status, String customerId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Finds a cart with the given status for the customer ID provided.Optional<D>findByStatusAndCustomerIdAndAccountId(String status, String customerId, String accountId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Finds a cart with the given status for the customer ID and account ID provided.Optional<D>findByStatusAndCustomerRefCustomerId(String status, String customerId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Deprecated.org.springframework.data.domain.Page<D>findHistoricalByCustomerIdAndDates(String customerId, Date startDate, Date endDate, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Find all carts that areDefaultCartStatuses.CANCELLEDorDefaultCartStatuses.SUBMITTEDfor the provided customer and dates.org.springframework.data.domain.Page<D>findHistoricalByCustomerRefCustomerIdAndDates(String customerId, Date startDate, Date endDate, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Deprecated.org.springframework.data.domain.Page<D>findPageMatchingTenantByStatus(String status, org.springframework.data.domain.Pageable pageable, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Finds a page of the carts with the givenstatusand matching the tenant from the givenContextInfo.
-
-
-
Method Detail
-
findByStatusAndCustomerId
@Policy(operationTypes=READ) Optional<D> findByStatusAndCustomerId(String status, String customerId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Finds a cart with the given status for the customer ID provided. By default, if multiple are found, this selects the cart with the latestcreateDate.- Parameters:
status- the status to find carts ofcustomerId- the customer ID to find carts withcontextInfo- the context to use for filtering the results- Returns:
- the cart with requested details, or empty if none was found.
-
findByStatusAndCustomerIdAndAccountId
@Policy(operationTypes=READ) Optional<D> findByStatusAndCustomerIdAndAccountId(String status, String customerId, @Nullable String accountId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Finds a cart with the given status for the customer ID and account ID provided. By default, if multiple are found, this selects the cart with the latestcreateDate.- Parameters:
status- the status to find carts ofcustomerId- the customer ID to find carts withaccountId- the account ID to find carts withcontextInfo- the context to use for filtering the results- Returns:
- the cart with requested details, or empty if none was found.
-
findByStatusAndCustomerRefCustomerId
@Deprecated @Policy(operationTypes=READ) Optional<D> findByStatusAndCustomerRefCustomerId(String status, String customerId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Deprecated.Finds a cart with the given status for the customer ID provided. By default, if multiple are found, this selects the cart with the latestcreateDate.- Parameters:
status- the status to find carts ofcustomerId- the customer ID to find carts withcontextInfo- the context to use for filtering the results- Returns:
- the cart with requested details, or empty if none was found.
-
findAllByStatusesAndCustomerId
@Policy(operationTypes=READ) org.springframework.data.domain.Page<D> findAllByStatusesAndCustomerId(Set<String> statuses, String customerId, @Nullable org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Finds all carts with the given status within the requested page- Parameters:
statuses- the status of the carts to considercustomerId- the ID of the customer to find carts forpage- the requested page of results from the databasecontextInfo- context information related to multitenancy- Returns:
- a page of carts with the requested details
-
findAllByStatusesAndCustomerIdAndAccountId
@Policy(operationTypes=READ) org.springframework.data.domain.Page<D> findAllByStatusesAndCustomerIdAndAccountId(Set<String> statuses, String customerId, @Nullable String accountId, @Nullable org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Finds all carts with the given status within the requested page. Account id can be null to find customer's personal non-account carts.- Parameters:
statuses- the status of the carts to considercustomerId- the ID of the customer to find carts forpage- the requested page of results from the databasecontextInfo- context information related to multitenancy- Returns:
- a page of carts with the requested details
-
findAllByStatusesAndCustomerRefCustomerId
@Deprecated @Policy(operationTypes=READ) org.springframework.data.domain.Page<D> findAllByStatusesAndCustomerRefCustomerId(Set<String> statuses, String customerId, @Nullable org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Deprecated.Finds all carts with the given status within the requested page- Parameters:
statuses- the status of the carts to considercustomerId- the ID of the customer to find carts forpage- the requested page of results from the databasecontextInfo- context information related to multitenancy- Returns:
- a page of carts with the requested details
-
findHistoricalByCustomerIdAndDates
@Policy(operationTypes=READ) org.springframework.data.domain.Page<D> findHistoricalByCustomerIdAndDates(String customerId, Date startDate, Date endDate, @Nullable org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Find all carts that areDefaultCartStatuses.CANCELLEDorDefaultCartStatuses.SUBMITTEDfor the provided customer and dates.- Parameters:
customerId- the id of the customer who owns the cartsstartDate- the starting date to filter carts byendDate- the ending date to filter carts bypage- the requested page of results from the databasecontextInfo- context information related to multitenancy- Returns:
- all carts that are
DefaultCartStatuses.CANCELLEDorDefaultCartStatuses.SUBMITTEDfor the provided customer and dates.
-
findHistoricalByCustomerRefCustomerIdAndDates
@Deprecated @Policy(operationTypes=READ) org.springframework.data.domain.Page<D> findHistoricalByCustomerRefCustomerIdAndDates(String customerId, Date startDate, Date endDate, @Nullable org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Deprecated.Find all carts that areDefaultCartStatuses.SUBMITTEDorDefaultCartStatuses.CANCELLEDfor the provided customer and dates.- Parameters:
customerId- the id of the customer who owns the cartsstartDate- the starting date to filter carts byendDate- the ending date to filter carts bypage- the requested page of results from the databasecontextInfo- context information related to multitenancy- Returns:
- all carts that are
DefaultCartStatuses.SUBMITTEDorDefaultCartStatuses.CANCELLEDfor the provided customer and dates.
-
deleteAbandonedAnonymousCarts
@Policy(operationTypes=DELETE) int deleteAbandonedAnonymousCarts(Instant deletePoint, Collection<String> statuses, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Delete anonymous carts that have not been updated since the given date.- Parameters:
deletePoint- Find carts that have not been updated since this Instant.statuses- Find carts that have one of these statuses.contextInfo- context information related to multitenancy.- Returns:
- The number of carts deleted.
-
findPageMatchingTenantByStatus
@Policy(operationTypes=READ) org.springframework.data.domain.Page<D> findPageMatchingTenantByStatus(String status, @Nullable org.springframework.data.domain.Pageable pageable, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Finds a page of the carts with the givenstatusand matching the tenant from the givenContextInfo.- Parameters:
status- the status of the cartpageable- the requested page of results from the databasecontextInfo- context information related to multitenancy- Returns:
- A page of the carts with the given
statusand matching the tenant from the givenContextInfo.
-
findAllMatchingTenantByIds
@Policy(operationTypes=READ) List<D> findAllMatchingTenantByIds(List<String> ids, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Finds a list of the carts with the givenidsand matching the tenant from the givenContextInfo.- Parameters:
ids- the ids of the cartcontextInfo- context information related to multitenancy- Returns:
- Finds a list of the carts with the given
idsand matching the tenant from the givenContextInfo.
-
-