public List getBooks() throws BooksNotFoundException {
try {
return em.createQuery("SELECT bd FROM Book bd ORDER BY bd.bookId")
.getResultList();
} catch (Exception ex) {
throw new BooksNotFoundException(
"Could not get books: " + ex.getMessage());
}
}