Class CustomerDAOImpl
- java.lang.Object
-
- ejava.examples.ejbwar.customer.dao.CustomerDAOImpl
-
- All Implemented Interfaces:
CustomerDAO
public class CustomerDAOImpl extends Object implements CustomerDAO
This class implemenets a DAO for the Customer domain.
-
-
Field Summary
Fields Modifier and Type Field Description private EntityManagerem
-
Constructor Summary
Constructors Constructor Description CustomerDAOImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreateCustomer(Customer customer)voiddeleteCustomer(Customer customer)List<Customer>findCustomerByName(String firstName, String lastName, int offset, int limit)CustomergetCustomer(int id)Customerupdate(Customer customer)
-
-
-
Field Detail
-
em
@Inject private EntityManager em
-
-
Method Detail
-
createCustomer
public void createCustomer(Customer customer)
- Specified by:
createCustomerin interfaceCustomerDAO
-
findCustomerByName
public List<Customer> findCustomerByName(String firstName, String lastName, int offset, int limit)
- Specified by:
findCustomerByNamein interfaceCustomerDAO
-
getCustomer
public Customer getCustomer(int id)
- Specified by:
getCustomerin interfaceCustomerDAO
-
update
public Customer update(Customer customer)
- Specified by:
updatein interfaceCustomerDAO
-
deleteCustomer
public void deleteCustomer(Customer customer)
- Specified by:
deleteCustomerin interfaceCustomerDAO
-
-