Package ejava.projects.edmv.jdbc
Class JDBCVehicleDAO
- java.lang.Object
-
- ejava.projects.edmv.jdbc.JDBCVehicleDAO
-
- All Implemented Interfaces:
VehicleDAO
public class JDBCVehicleDAO extends Object implements VehicleDAO
This class provides a _sparse_ example of a JDBC DAO that implements O/R mapping for objects related to vehicles.
-
-
Field Summary
Fields Modifier and Type Field Description private Connectionconnectionprivate static org.slf4j.Loggerlog
-
Constructor Summary
Constructors Constructor Description JDBCVehicleDAO()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreateRegistration(VehicleRegistration registration)List<VehicleRegistration>getRegistrations(int index, int count)voidsetConnection(Connection connection)
-
-
-
Field Detail
-
log
private static org.slf4j.Logger log
-
connection
private Connection connection
-
-
Method Detail
-
setConnection
public void setConnection(Connection connection)
-
createRegistration
public void createRegistration(VehicleRegistration registration) throws DAOException
- Specified by:
createRegistrationin interfaceVehicleDAO- Throws:
DAOException
-
getRegistrations
public List<VehicleRegistration> getRegistrations(int index, int count) throws DAOException
- Specified by:
getRegistrationsin interfaceVehicleDAO- Throws:
DAOException
-
-