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 EntityManagerem
-
Constructor Summary
Constructors Constructor Description JPAVehicleDAO()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreateRegistration(VehicleRegistration registration)List<VehicleRegistration>getRegistrations(int index, int count)voidsetEntityManager(EntityManager em)
-
-
-
Field Detail
-
em
private EntityManager em
-
-
Method Detail
-
setEntityManager
public void setEntityManager(EntityManager em)
-
createRegistration
public void createRegistration(VehicleRegistration registration)
- Specified by:
createRegistrationin interfaceVehicleDAO
-
getRegistrations
public List<VehicleRegistration> getRegistrations(int index, int count)
- Specified by:
getRegistrationsin interfaceVehicleDAO
-
-