Package io.keikai.app.impl
Class BookManagerImpl
- java.lang.Object
-
- io.keikai.app.impl.BookManagerImpl
-
- All Implemented Interfaces:
BookManager
,Serializable
- Direct Known Subclasses:
BookManagerEx
public class BookManagerImpl extends Object implements BookManager, Serializable
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected BookRepository
repo
-
Constructor Summary
Constructors Modifier Constructor Description protected
BookManagerImpl(BookRepository repo)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method 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)
-
-
-
Field Detail
-
repo
protected BookRepository repo
-
-
Constructor Detail
-
BookManagerImpl
protected BookManagerImpl(BookRepository repo)
-
-
Method Detail
-
readBook
public Book readBook(BookInfo info) throws IOException
- Specified by:
readBook
in interfaceBookManager
- Throws:
IOException
-
updateBook
public BookInfo updateBook(BookInfo info, Book book) throws IOException
- Specified by:
updateBook
in interfaceBookManager
- Throws:
IOException
-
saveBook
public BookInfo saveBook(BookInfo info, Book book) throws IOException
- Specified by:
saveBook
in interfaceBookManager
- Throws:
IOException
-
deleteBook
public void deleteBook(BookInfo info) throws IOException
- Specified by:
deleteBook
in interfaceBookManager
- Throws:
IOException
-
detachBook
public void detachBook(BookInfo info) throws IOException
- Specified by:
detachBook
in interfaceBookManager
- Throws:
IOException
-
isBookAttached
public boolean isBookAttached(BookInfo info)
- Specified by:
isBookAttached
in interfaceBookManager
-
saveAll
public void saveAll() throws IOException
- Specified by:
saveAll
in interfaceBookManager
- Throws:
IOException
-
getInstance
public static BookManagerImpl getInstance(BookRepository repo)
-
shutdownAutoFileSaving
public void shutdownAutoFileSaving()
- Specified by:
shutdownAutoFileSaving
in interfaceBookManager
-
-