Modifier and Type | Field and Description |
---|---|
private EntityManager |
em |
Constructor and Description |
---|
JPABookDAOImpl() |
Modifier and Type | Method and Description |
---|---|
Book |
create(Book book)
Add the book to the database.
|
List<Book> |
findAll(int offset,
int limit)
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 |
setEntityManager(EntityManager em) |
Book |
update(Book book)
Updates the book in the database with the values in this object.
|
private EntityManager em
public void setEntityManager(EntityManager em)
public Book create(Book book)
BookDAO
public Book update(Book book)
BookDAO
public Book get(long id)
BookDAO
public void remove(Book book)
BookDAO
Copyright © 2015 John's Hopkins University, Engineering Programs for Professionals. All rights reserved.