Package ejava.examples.webtier.jpa
Class StudentJPADAO
- java.lang.Object
-
- ejava.examples.webtier.jpa.StudentJPADAO
-
- All Implemented Interfaces:
StudentDAO
public class StudentJPADAO extends Object implements StudentDAO
-
-
Field Summary
Fields Modifier and Type Field Description private EntityManager
em
private org.slf4j.Logger
logger
-
Constructor Summary
Constructors Constructor Description StudentJPADAO()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Student
create(Student student)
List<Student>
find(int index, int count)
List<Student>
find(String name, int index, int count)
List<Student>
find(String name, Map<String,Object> args, int index, int count)
Student
get(long id)
Student
remove(Student student)
void
setEntityManager(EntityManager em)
Student
update(Student student)
-
-
-
Field Detail
-
logger
private org.slf4j.Logger logger
-
em
private EntityManager em
-
-
Method Detail
-
setEntityManager
public void setEntityManager(EntityManager em)
-
create
public Student create(Student student)
- Specified by:
create
in interfaceStudentDAO
-
find
public List<Student> find(int index, int count)
- Specified by:
find
in interfaceStudentDAO
-
find
public List<Student> find(String name, Map<String,Object> args, int index, int count)
- Specified by:
find
in interfaceStudentDAO
-
find
public List<Student> find(String name, int index, int count)
- Specified by:
find
in interfaceStudentDAO
-
get
public Student get(long id)
- Specified by:
get
in interfaceStudentDAO
-
remove
public Student remove(Student student)
- Specified by:
remove
in interfaceStudentDAO
-
update
public Student update(Student student)
- Specified by:
update
in interfaceStudentDAO
-
-