Package ejava.examples.asyncmarket.jpa
Class JPAPersonDAO
- java.lang.Object
-
- ejava.examples.asyncmarket.jpa.JPAPersonDAO
-
-
Field Summary
Fields Modifier and Type Field Description private EntityManager
em
private static String
GET_ALL_PEOPLE
private static String
GET_PEOPLE_BY_USERID
-
Constructor Summary
Constructors Constructor Description JPAPersonDAO()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Person
createPerson(Person person)
List<Person>
getPeople(int index, int count)
List<Person>
getPeople(String queryString, Map<String,Object> params, int index, int count)
Person
getPerson(long personId)
Person
getPersonByUserId(String userId)
void
removePerson(Person person)
void
setEntityManager(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:
getPersonByUserId
in interfacePersonDAO
-
createPerson
public Person createPerson(Person person)
- Specified by:
createPerson
in interfacePersonDAO
-
removePerson
public void removePerson(Person person)
- Specified by:
removePerson
in interfacePersonDAO
-
-