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 Connection
connection
private static org.slf4j.Logger
log
-
Constructor Summary
Constructors Constructor Description JDBCVehicleDAO()
-
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
setConnection(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:
createRegistration
in interfaceVehicleDAO
- Throws:
DAOException
-
getRegistrations
public List<VehicleRegistration> getRegistrations(int index, int count) throws DAOException
- Specified by:
getRegistrations
in interfaceVehicleDAO
- Throws:
DAOException
-
-