Interface ResourcePurgeDao
- All Known Implementing Classes:
ResourcePurgeDaoImpl
public interface ResourcePurgeDao
Adds capability to delete old or defunct entities from the persistence layer (e.g. Carts and anonymous Customers)
- Author:
- Jeff Fischer
-
Method Summary
Modifier and TypeMethodDescriptionfindCarts(String[] names, OrderStatus[] statuses, Date dateCreatedMinThreshold, Boolean isPreview, int startPos, int length, List<Long> excludedIds) Finds carts from the database.findCarts(String[] names, OrderStatus[] statuses, Date dateCreatedMinThreshold, Boolean isPreview, List<Long> excludedIds) Finds carts from the database.findCartsCount(String[] names, OrderStatus[] statuses, Date dateCreatedMinThreshold, Boolean isPreview, List<Long> excludedIds) Finds the count of carts from the database.findCustomers(Date dateCreatedMinThreshold, Boolean registered, Boolean deactivated, Boolean isPreview, int startPos, int length, List<Long> excludedIds) Find customers in the database.findCustomers(Date dateCreatedMinThreshold, Boolean registered, Boolean deactivated, Boolean isPreview, List<Long> excludedIds) Find customers in the database.findCustomersCount(Date dateCreatedMinThreshold, Boolean registered, Boolean deactivated, Boolean isPreview, List<Long> excludedIds) Find count of customers in the database.
-
Method Details
-
findCarts
List<Order> findCarts(String[] names, OrderStatus[] statuses, Date dateCreatedMinThreshold, Boolean isPreview, List<Long> excludedIds) Finds carts from the database. Carts are generally considered orders that have not made it to the submitted status. The method parameters can be left null, or included to refine the select criteria. Note, if statuses are null, the query defaults to selecting only orders that have a status of IN_PROCESS.- Parameters:
names- One or more order names to restrict the select by. Can be null.statuses- One or more order statuses to restrict the select by. Can be null.dateCreatedMinThreshold- Min creation date to restrict the select by. Orders created before this date are retrieved. Can be null.isPreview- whether or not the results should be preview orders. Can be null.- Returns:
- the list of found carts
-
findCarts
List<Order> findCarts(String[] names, OrderStatus[] statuses, Date dateCreatedMinThreshold, Boolean isPreview, int startPos, int length, List<Long> excludedIds) Finds carts from the database. Carts are generally considered orders that have not made it to the submitted status. The method parameters can be left null, or included to refine the select criteria. Note, if statuses are null, the query defaults to selecting only orders that have a status of IN_PROCESS. This overloaded version of the method is capable of retrieving a portion or "page" of the total results.- Parameters:
names- One or more order names to restrict the select by. Can be null.statuses- One or more order statuses to restrict the select by. Can be null.dateCreatedMinThreshold- Min creation date to restrict the select by. Orders created before this date are retrieved. Can be null.isPreview- whether or not the results should be preview orders. Can be null.startPos- the position in the overall result set from which to start the returned list.length- the max number of results to include in the returned list.- Returns:
- the list of found carts
-
findCartsCount
Long findCartsCount(String[] names, OrderStatus[] statuses, Date dateCreatedMinThreshold, Boolean isPreview, List<Long> excludedIds) Finds the count of carts from the database. Carts are generally considered orders that have not made it to the submitted status. The method parameters can be left null, or included to refine the select criteria. Note, if statuses are null, the query defaults to selecting only orders that have a status of IN_PROCESS.- Parameters:
names- One or more order names to restrict the select by. Can be null.statuses- One or more order statuses to restrict the select by. Can be null.dateCreatedMinThreshold- Min creation date to restrict the select by. Orders created before this date are retrieved. Can be null.isPreview- whether or not the results should be preview orders. Can be null.- Returns:
- the number of carts found
-
findCustomers
List<Customer> findCustomers(Date dateCreatedMinThreshold, Boolean registered, Boolean deactivated, Boolean isPreview, List<Long> excludedIds) Find customers in the database. The method parameters can be left null, or included to refine the select criteria.- Parameters:
dateCreatedMinThreshold- Min creation date to restrict the select by. Customers created before this date are retrieved. Can be null.registered- Whether or not the results should be registered customers. Can be null.deactivated- Whether or not the results should be deactivated customers. Can be null.isPreview- Whether or not the results should be preview customers. Can be null.- Returns:
- the list of found customers
-
findCustomers
List<Customer> findCustomers(Date dateCreatedMinThreshold, Boolean registered, Boolean deactivated, Boolean isPreview, int startPos, int length, List<Long> excludedIds) Find customers in the database. The method parameters can be left null, or included to refine the select criteria. This overloaded version of the method is capable of retrieving a portion or "page" of the total results.- Parameters:
dateCreatedMinThreshold- Min creation date to restrict the select by. Customers created before this date are retrieved. Can be null.registered- Whether or not the results should be registered customers. Can be null.deactivated- Whether or not the results should be deactivated customers. Can be null.isPreview- Whether or not the results should be preview customers. Can be null.startPos- the position in the overall result set from which to start the returned list.length- the max number of results to include in the returned list.- Returns:
- the list of found customers
-
findCustomersCount
Long findCustomersCount(Date dateCreatedMinThreshold, Boolean registered, Boolean deactivated, Boolean isPreview, List<Long> excludedIds) Find count of customers in the database. The method parameters can be left null, or included to refine the select criteria.- Parameters:
dateCreatedMinThreshold- Min creation date to restrict the select by. Customers created before this date are retrieved. Can be null.registered- Whether or not the results should be registered customers. Can be null.deactivated- Whether or not the results should be deactivated customers. Can be null.isPreview- Whether or not the results should be preview customers. Can be null.- Returns:
- the count of found customers
-