}
/*Private Functions Below : */
private Book setterForBook(ResultSet rs) throws SQLException {
Book book = new Book();
book.setId(rs.getInt("id"));
book.setName(rs.getString("name"));
book.setAuthor_id(rs.getInt("author_id"));
book.setPrice(rs.getFloat("price"));
book.setTotal_pages(rs.getInt("total_pages"));
//Set the author object for book.
AuthorModel authorModel = new AuthorModel();
Author author = authorModel.whereId(book.getAuthor_id());
book.setAuthor(author);
return book;
}