@Repository(value="blResourcePurgeDao") public class ResourcePurgeDaoImpl extends Object implements ResourcePurgeDao
Modifier and Type | Field and Description |
---|---|
protected javax.persistence.EntityManager |
em |
static int |
RESTRICT_IN_CLAUSE_MAX_SIZE |
Constructor and Description |
---|
ResourcePurgeDaoImpl() |
Modifier and Type | Method and Description |
---|---|
protected <T> void |
applyLimitedInClause(List<Long> ids,
javax.persistence.criteria.CriteriaBuilder builder,
javax.persistence.criteria.Root<T> root,
List<javax.persistence.criteria.Predicate> restrictions) |
protected <T> javax.persistence.TypedQuery<T> |
buildCartQuery(String[] names,
OrderStatus[] statuses,
Date dateCreatedMinThreshold,
Boolean isPreview,
Class<T> returnType,
List<Long> excludedIds) |
protected <T> javax.persistence.TypedQuery<T> |
buildCustomerQuery(Date dateCreatedMinThreshold,
Boolean registered,
Boolean deactivated,
Boolean isPreview,
Class<T> returnType,
List<Long> excludedIds) |
List<Order> |
findCarts(String[] names,
OrderStatus[] statuses,
Date dateCreatedMinThreshold,
Boolean isPreview,
int startPos,
int length,
List<Long> excludedIds)
Finds carts from the database.
|
List<Order> |
findCarts(String[] names,
OrderStatus[] statuses,
Date dateCreatedMinThreshold,
Boolean isPreview,
List<Long> excludedIds)
Finds carts from the database.
|
Long |
findCartsCount(String[] names,
OrderStatus[] statuses,
Date dateCreatedMinThreshold,
Boolean isPreview,
List<Long> excludedIds)
Finds the count of carts from the database.
|
List<Customer> |
findCustomers(Date dateCreatedMinThreshold,
Boolean registered,
Boolean deactivated,
Boolean isPreview,
int startPos,
int length,
List<Long> excludedIds)
Find customers in the database.
|
List<Customer> |
findCustomers(Date dateCreatedMinThreshold,
Boolean registered,
Boolean deactivated,
Boolean isPreview,
List<Long> excludedIds)
Find customers in the database.
|
Long |
findCustomersCount(Date dateCreatedMinThreshold,
Boolean registered,
Boolean deactivated,
Boolean isPreview,
List<Long> excludedIds)
Find count of customers in the database.
|
public static final int RESTRICT_IN_CLAUSE_MAX_SIZE
protected javax.persistence.EntityManager em
public List<Order> findCarts(String[] names, OrderStatus[] statuses, Date dateCreatedMinThreshold, Boolean isPreview, List<Long> excludedIds)
ResourcePurgeDao
findCarts
in interface ResourcePurgeDao
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.public List<Order> findCarts(String[] names, OrderStatus[] statuses, Date dateCreatedMinThreshold, Boolean isPreview, int startPos, int length, List<Long> excludedIds)
ResourcePurgeDao
findCarts
in interface ResourcePurgeDao
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.public Long findCartsCount(String[] names, OrderStatus[] statuses, Date dateCreatedMinThreshold, Boolean isPreview, List<Long> excludedIds)
ResourcePurgeDao
findCartsCount
in interface ResourcePurgeDao
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.public List<Customer> findCustomers(Date dateCreatedMinThreshold, Boolean registered, Boolean deactivated, Boolean isPreview, List<Long> excludedIds)
ResourcePurgeDao
findCustomers
in interface ResourcePurgeDao
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.public List<Customer> findCustomers(Date dateCreatedMinThreshold, Boolean registered, Boolean deactivated, Boolean isPreview, int startPos, int length, List<Long> excludedIds)
ResourcePurgeDao
findCustomers
in interface ResourcePurgeDao
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.public Long findCustomersCount(Date dateCreatedMinThreshold, Boolean registered, Boolean deactivated, Boolean isPreview, List<Long> excludedIds)
ResourcePurgeDao
findCustomersCount
in interface ResourcePurgeDao
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.protected <T> javax.persistence.TypedQuery<T> buildCustomerQuery(Date dateCreatedMinThreshold, Boolean registered, Boolean deactivated, Boolean isPreview, Class<T> returnType, List<Long> excludedIds)
protected <T> void applyLimitedInClause(List<Long> ids, javax.persistence.criteria.CriteriaBuilder builder, javax.persistence.criteria.Root<T> root, List<javax.persistence.criteria.Predicate> restrictions)
Copyright © 2017. All rights reserved.