public class BookManagerImpl extends Object implements BookManager, Serializable
Modifier and Type | Field and Description |
---|---|
protected BookRepository |
repo |
Modifier | Constructor and Description |
---|---|
protected |
BookManagerImpl(BookRepository repo) |
Modifier and Type | Method and Description |
---|---|
void |
deleteBook(BookInfo info) |
void |
detachBook(BookInfo info) |
static BookManagerImpl |
getInstance(BookRepository repo) |
boolean |
isBookAttached(BookInfo info) |
Book |
readBook(BookInfo info) |
void |
saveAll() |
BookInfo |
saveBook(BookInfo info,
Book book) |
void |
shutdownAutoFileSaving() |
BookInfo |
updateBook(BookInfo info,
Book book) |
protected BookRepository repo
protected BookManagerImpl(BookRepository repo)
public Book readBook(BookInfo info) throws IOException
readBook
in interface BookManager
IOException
public BookInfo updateBook(BookInfo info, Book book) throws IOException
updateBook
in interface BookManager
IOException
public BookInfo saveBook(BookInfo info, Book book) throws IOException
saveBook
in interface BookManager
IOException
public void deleteBook(BookInfo info) throws IOException
deleteBook
in interface BookManager
IOException
public void detachBook(BookInfo info) throws IOException
detachBook
in interface BookManager
IOException
public boolean isBookAttached(BookInfo info)
isBookAttached
in interface BookManager
public void saveAll() throws IOException
saveAll
in interface BookManager
IOException
public static BookManagerImpl getInstance(BookRepository repo)
public void shutdownAutoFileSaving()
shutdownAutoFileSaving
in interface BookManager
Copyright © 2020. All rights reserved.