@Repository(value="blCustomerDao") public class CustomerDaoImpl extends Object implements CustomerDao
| Modifier and Type | Field and Description |
|---|---|
protected javax.persistence.EntityManager |
em |
protected EntityConfiguration |
entityConfiguration |
| Constructor and Description |
|---|
CustomerDaoImpl() |
| Modifier and Type | Method and Description |
|---|---|
Customer |
create() |
void |
delete(Customer customer)
Remove a customer from the persistent store
|
void |
detach(Customer customer)
Detaches the given Customer instance from the entity manager.
|
List<Customer> |
readBatchCustomers(int start,
int pageSize)
Reads a batch list of customers from the DB.
|
List<Customer> |
readBatchCustomersFromLastID(Long lastID,
int pageSize)
Reads a batch of customer using ID as a starting point
|
Customer |
readCustomerByEmail(String emailAddress)
Returns the first customer that matches the passed in email.
|
Customer |
readCustomerByExternalId(String externalId) |
Customer |
readCustomerById(Long id) |
Customer |
readCustomerByUsername(String username)
Returns the first customer that match the passed in username, with caching defaulted.
|
Customer |
readCustomerByUsername(String username,
Boolean cacheable)
Returns the first customer that match the passed in username, and caches according to
cacheable.
|
List<Customer> |
readCustomersByEmail(String emailAddress)
Returns all customers that matches the passed in email.
|
List<Customer> |
readCustomersByIds(List<Long> ids) |
List<Customer> |
readCustomersByUsername(String username)
Returns all customers that match the passed in username, with caching defaulted.
|
List<Customer> |
readCustomersByUsername(String username,
Boolean cacheable)
Returns all customers that match the passed in username, and caches according to
cacheable.
|
Long |
readNumberOfCustomers() |
void |
refreshCustomer(Customer customer) |
Customer |
save(Customer customer) |
protected javax.persistence.EntityManager em
protected EntityConfiguration entityConfiguration
public Customer readCustomerById(Long id)
readCustomerById in interface CustomerDaopublic Customer readCustomerByExternalId(String externalId)
readCustomerByExternalId in interface CustomerDaopublic List<Customer> readCustomersByIds(List<Long> ids)
readCustomersByIds in interface CustomerDaopublic Customer readCustomerByUsername(String username)
CustomerDaoreadCustomerByUsername in interface CustomerDaopublic Customer readCustomerByUsername(String username, Boolean cacheable)
CustomerDaoreadCustomerByUsername in interface CustomerDaopublic List<Customer> readCustomersByUsername(String username)
CustomerDaoreadCustomersByUsername in interface CustomerDaopublic List<Customer> readCustomersByUsername(String username, Boolean cacheable)
CustomerDaoreadCustomersByUsername in interface CustomerDaopublic Customer readCustomerByEmail(String emailAddress)
CustomerDaoreadCustomerByEmail in interface CustomerDaopublic List<Customer> readCustomersByEmail(String emailAddress)
CustomerDaoreadCustomersByEmail in interface CustomerDaopublic Customer save(Customer customer)
save in interface CustomerDaopublic Customer create()
create in interface CustomerDaopublic void delete(Customer customer)
CustomerDaodelete in interface CustomerDaocustomer - the customer entity to removepublic void detach(Customer customer)
CustomerDaodetach in interface CustomerDaopublic List<Customer> readBatchCustomers(int start, int pageSize)
CustomerDaoreadBatchCustomers in interface CustomerDaopublic List<Customer> readBatchCustomersFromLastID(Long lastID, int pageSize)
CustomerDaoreadBatchCustomersFromLastID in interface CustomerDaopublic Long readNumberOfCustomers()
readNumberOfCustomers in interface CustomerDaopublic void refreshCustomer(Customer customer)
refreshCustomer in interface CustomerDaoCopyright © 2022. All rights reserved.