Package io.keikai.app

Interface BookRepository

    • Method Detail

      • list

        List<BookInfo> list()
        Get the BookInfo list
        Returns:
        the BookInfo list
      • 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 BookInfo
        book - 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 BookInfo
        book - the book to be saved
        isForce - 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 name
        book - 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