| Modifier and Type | Field and Description |
|---|---|
private Connection |
connection |
| Constructor and Description |
|---|
JDBCBookDAOImpl() |
| Modifier and Type | Method and Description |
|---|---|
Book |
create(Book book)
Add the book to the database.
|
List<Book> |
findAll(int start,
int count)
Returns a collection of books, starting at the index provided and
limiting the collection to the count value.
|
Book |
get(long id)
Gets a book from the database by its ID.
|
void |
remove(Book book)
Removes a book from the database.
|
void |
setConnection(Connection connection) |
Book |
update(Book book)
Updates the book in the database with the values in this object.
|
private Connection connection
public void setConnection(Connection connection)
public Book create(Book book) throws PersistenceException
BookDAOcreate in interface BookDAOPersistenceExceptionpublic Book update(Book book) throws PersistenceException
BookDAOupdate in interface BookDAOPersistenceExceptionpublic Book get(long id) throws PersistenceException
BookDAOget in interface BookDAOPersistenceExceptionpublic void remove(Book book) throws PersistenceException
BookDAOremove in interface BookDAOPersistenceExceptionpublic List<Book> findAll(int start, int count) throws PersistenceException
BookDAOfindAll in interface BookDAOPersistenceExceptionCopyright © 2015 John's Hopkins University, Engineering Programs for Professionals. All rights reserved.