Interface CustomerDao
- All Known Implementing Classes:
CustomerDaoImpl
public interface CustomerDao
-
Method Summary
Modifier and TypeMethodDescriptioncreate()voidRemove a customer from the persistent storevoidDetaches the given Customer instance from the entity manager.readBatchCustomers(int start, int pageSize) Reads a batch list of customers from the DB.readBatchCustomersFromLastID(Long lastID, int pageSize) Reads a batch of customer using ID as a starting pointreadCustomerByEmail(String emailAddress) Returns the first customer that matches the passed in email.readCustomerByExternalId(String externalId) readCustomerById(Long id) readCustomerByUsername(String username) Returns the first customer that match the passed in username, with caching defaulted.readCustomerByUsername(String username, Boolean cacheable) Returns the first customer that match the passed in username, and caches according to cacheable.readCustomersByEmail(String emailAddress) Returns all customers that matches the passed in email.readCustomersByIds(List<Long> ids) readCustomersByUsername(String username) Returns all customers that match the passed in username, with caching defaulted.readCustomersByUsername(String username, Boolean cacheable) Returns all customers that match the passed in username, and caches according to cacheable.voidrefreshCustomer(Customer customer)
-
Method Details
-
readCustomerById
-
readCustomerByExternalId
-
readCustomersByIds
-
readBatchCustomers
Reads a batch list of customers from the DB.- Parameters:
start-pageSize-- Returns:
-
readBatchCustomersFromLastID
Reads a batch of customer using ID as a starting point- Parameters:
lastID-pageSize-- Returns:
-
readCustomerByUsername
Returns the first customer that match the passed in username, with caching defaulted.- Parameters:
username-- Returns:
-
readCustomerByUsername
Returns the first customer that match the passed in username, and caches according to cacheable.- Parameters:
username-cacheable-- Returns:
-
readCustomersByUsername
Returns all customers that match the passed in username, with caching defaulted.- Parameters:
username-- Returns:
-
readCustomersByUsername
Returns all customers that match the passed in username, and caches according to cacheable.- Parameters:
username-cacheable-- Returns:
-
save
-
readCustomerByEmail
Returns the first customer that matches the passed in email.- Parameters:
emailAddress-- Returns:
-
readCustomersByEmail
Returns all customers that matches the passed in email.- Parameters:
emailAddress-- Returns:
-
create
Customer create() -
delete
Remove a customer from the persistent store- Parameters:
customer- the customer entity to remove
-
detach
Detaches the given Customer instance from the entity manager.- Parameters:
customer-
-
readNumberOfCustomers
Long readNumberOfCustomers() -
refreshCustomer
-