Interface ResourcePurgeService
- All Known Implementing Classes:
ResourcePurgeServiceImpl
public interface ResourcePurgeService
Service capable of deleting old or defunct entities from the persistence layer (e.g. Carts and anonymous Customers)
- Author:
- Jeff Fischer
-
Method Summary
Modifier and TypeMethodDescriptionvoidnotifyCarts(Map<String, String> config) voidpurgeCarts(Map<String, String> config) Execute a purge of carts from the persistence layer based on the configuration parameters.voidpurgeCustomers(Map<String, String> config) voidpurgeOrderHistory(Class<?> rootType, String rootTypeIdValue, Map<String, List<DeleteStatementGeneratorImpl.PathElement>> depends, Map<String, Integer> config) Generates delete statement and executes them Originally was designed to purge orders and its dependencies
-
Method Details
-
purgeCarts
Execute a purge of carts from the persistence layer based on the configuration parameters. The default implementation is capable of looking at any combination of name, status and creation date. Take a look atorg.broadleafcommerce.core.order.service.OrderService#findCarts(String[], org.broadleafcommerce.core.order.service.type.OrderStatus[], java.util.Date, Boolean, int, int)for more info on the default behavior.- Parameters:
config- Map of params used to drive the selection of carts to purge
-
notifyCarts
-
purgeCustomers
-
purgeOrderHistory
void purgeOrderHistory(Class<?> rootType, String rootTypeIdValue, Map<String, List<DeleteStatementGeneratorImpl.PathElement>> depends, Map<String, Integer> config) Generates delete statement and executes them Originally was designed to purge orders and its dependencies- Parameters:
rootType- - entity type to start from to find all dependent entitiesrootTypeIdValue- - id value to use, can be any string like '?' that you will want to replace with concrete id, or id itselfdepends- - a map representing dependent tables that can't be navigated from a root type, where key is a table name to depend on, value is structure representing a depending table name, join column name(FK column that is in depending table) and id field name in table to depend on.
-