Package ejava.examples.asyncmarket.jpa
Class JPAPersonDAO
- java.lang.Object
-
- ejava.examples.asyncmarket.jpa.JPAPersonDAO
-
-
Field Summary
Fields Modifier and Type Field Description private EntityManageremprivate static StringGET_ALL_PEOPLEprivate static StringGET_PEOPLE_BY_USERID
-
Constructor Summary
Constructors Constructor Description JPAPersonDAO()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PersoncreatePerson(Person person)List<Person>getPeople(int index, int count)List<Person>getPeople(String queryString, Map<String,Object> params, int index, int count)PersongetPerson(long personId)PersongetPersonByUserId(String userId)voidremovePerson(Person person)voidsetEntityManager(EntityManager em)
-
-
-
Field Detail
-
GET_ALL_PEOPLE
private static final String GET_ALL_PEOPLE
- See Also:
- Constant Field Values
-
GET_PEOPLE_BY_USERID
private static final String GET_PEOPLE_BY_USERID
- See Also:
- Constant Field Values
-
em
private EntityManager em
-
-
Method Detail
-
setEntityManager
public void setEntityManager(EntityManager em)
-
getPersonByUserId
public Person getPersonByUserId(String userId)
- Specified by:
getPersonByUserIdin interfacePersonDAO
-
createPerson
public Person createPerson(Person person)
- Specified by:
createPersonin interfacePersonDAO
-
removePerson
public void removePerson(Person person)
- Specified by:
removePersonin interfacePersonDAO
-
-