Package ejava.projects.edmv.jpa
Class JPAVehicleDAO
- java.lang.Object
-
- ejava.projects.edmv.jpa.JPAVehicleDAO
-
- All Implemented Interfaces:
VehicleDAO
public class JPAVehicleDAO extends Object implements VehicleDAO
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 JPAVehicleDAO()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
createRegistration(VehicleRegistration registration)
List<VehicleRegistration>
getRegistrations(int index, int count)
void
setEntityManager(EntityManager em)
-
-
-
Field Detail
-
em
private EntityManager em
-
-
Method Detail
-
setEntityManager
public void setEntityManager(EntityManager em)
-
createRegistration
public void createRegistration(VehicleRegistration registration)
- Specified by:
createRegistration
in interfaceVehicleDAO
-
getRegistrations
public List<VehicleRegistration> getRegistrations(int index, int count)
- Specified by:
getRegistrations
in interfaceVehicleDAO
-
-