Package ejava.projects.edmv.jdbc
Class JDBCPersonDAO
- java.lang.Object
-
- ejava.projects.edmv.jdbc.JDBCPersonDAO
-
-
Field Summary
Fields Modifier and Type Field Description private Connectionconnectionprivate static org.slf4j.Loggerlog
-
Constructor Summary
Constructors Constructor Description JDBCPersonDAO()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreatePerson(Person person)List<Person>getPeople(int index, int count)PersongetPerson(long id)voidsetConnection(Connection connection)
-
-
-
Field Detail
-
log
private static org.slf4j.Logger log
-
connection
private Connection connection
-
-
Method Detail
-
setConnection
public void setConnection(Connection connection)
-
createPerson
public void createPerson(Person person) throws DAOException
- Specified by:
createPersonin interfacePersonDAO- Throws:
DAOException
-
getPerson
public Person getPerson(long id) throws DAOException
- Specified by:
getPersonin interfacePersonDAO- Throws:
DAOException
-
getPeople
public List<Person> getPeople(int index, int count) throws DAOException
- Specified by:
getPeoplein interfacePersonDAO- Throws:
DAOException
-
-