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 BookManagerIOExceptionpublic BookInfo updateBook(BookInfo info, Book book) throws IOException
updateBook in interface BookManagerIOExceptionpublic BookInfo saveBook(BookInfo info, Book book) throws IOException
saveBook in interface BookManagerIOExceptionpublic void deleteBook(BookInfo info) throws IOException
deleteBook in interface BookManagerIOExceptionpublic void detachBook(BookInfo info) throws IOException
detachBook in interface BookManagerIOExceptionpublic boolean isBookAttached(BookInfo info)
isBookAttached in interface BookManagerpublic void saveAll()
throws IOException
saveAll in interface BookManagerIOExceptionpublic static BookManagerImpl getInstance(BookRepository repo)
public void shutdownAutoFileSaving()
shutdownAutoFileSaving in interface BookManagerCopyright © 2020. All rights reserved.