Package ejava.projects.esales.jpa
Class JPAAccountDAO
- java.lang.Object
-
- ejava.projects.esales.jpa.JPAAccountDAO
-
- All Implemented Interfaces:
AccountDAO
public class JPAAccountDAO extends Object implements AccountDAO
This class provides a sparse example of a JPA DAO for the class project. It is put in place here to demonstrate some of the end-to-end use cases,
-
-
Field Summary
Fields Modifier and Type Field Description private EntityManager
em
-
Constructor Summary
Constructors Constructor Description JPAAccountDAO()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
createAccount(Account account)
List<Account>
getAccounts(int index, int count)
void
setEntityManager(EntityManager em)
-
-
-
Field Detail
-
em
private EntityManager em
-
-
Method Detail
-
setEntityManager
public void setEntityManager(EntityManager em)
-
createAccount
public void createAccount(Account account)
- Specified by:
createAccount
in interfaceAccountDAO
-
getAccounts
public List<Account> getAccounts(int index, int count)
- Specified by:
getAccounts
in interfaceAccountDAO
-
-