Package io.keikai.app
Interface BookRepository
-
- All Superinterfaces:
Serializable
public interface BookRepository extends Serializable
- Author:
- dennis
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleandelete(BookInfo info)Deletes a bookList<BookInfo>list()Get the BookInfo listBookload(BookInfo info)Loads a bookBookInfosave(BookInfo info, Book book)Saves a book and replace book of BookInfo.BookInfosave(BookInfo info, Book book, boolean isForce)Saves a book and replace book of BookInfoBookInfosaveAs(String name, Book book)Saves a book with a new name,
-
-
-
Method Detail
-
load
Book load(BookInfo info) throws IOException
Loads a book- Parameters:
info- the BookInfo- Returns:
- book or null if no such book.
- Throws:
IOException
-
save
BookInfo save(BookInfo info, Book book) throws IOException
Saves a book and replace book of BookInfo. This method will do nothing when book's dirty flag is false.- Parameters:
info- the BookInfobook- the book to be saved- Returns:
- the updated BookInfo, or null if not saved.
- Throws:
IOException
-
save
BookInfo save(BookInfo info, Book book, boolean isForce) throws IOException
Saves a book and replace book of BookInfo- Parameters:
info- the BookInfobook- the book to be savedisForce- save without dirty check if true- Returns:
- the updated BookInfo, or null if not saved.
- Throws:
IOException
-
saveAs
BookInfo saveAs(String name, Book book) throws IOException
Saves a book with a new name,- Parameters:
name- the new namebook- the book to be saved- Returns:
- the new BookInfo, or null if not saved.
- Throws:
IOException
-
delete
boolean delete(BookInfo info) throws IOException
Deletes a book- Parameters:
info- the BookInfo- Returns:
- true if deleted, or false if not
- Throws:
IOException
-
-