@@ -0,0 +1,1069 @@
+package cz.muni.fi.pa165.facade;%0A%0Aimport java.util.List;%0A%0Aimport cz.muni.fi.pa165.dto.BookDTO;%0Aimport cz.muni.fi.pa165.dto.CreateBookDTO;%0Aimport cz.muni.fi.pa165.enums.BookState;%0A%0A/**%0A * Facade layer for Book entity%0A *%0A * @author Michael Simacek%0A *%0A */%0Apublic interface BookFacade %7B%0A    /**%0A     * Persists book into database%0A     *%0A     * @param book%0A     *            book to be persisted%0A     */%0A    void createBook(CreateBookDTO book);%0A%0A    /**%0A     * Returns book with given id or null%0A     *%0A     * @param id%0A     *            book id%0A     * @return boook or null%0A     */%0A    BookDTO findById(Long id);%0A%0A    /**%0A     * Obtains all persisted books%0A     *%0A     * @return list of all books%0A     */%0A    List%3CBookDTO%3E findAll();%0A%0A    /**%0A     * Removes book from the database%0A     *%0A     * @param book%0A     */%0A    void delete(Long bookId);%0A%0A    /**%0A     * Sets book current state. Can be set only to a worse (or the same) state%0A     * than it already was%0A     *%0A     * @param bookId%0A     * @param newState%0A     */%0A    void setState(Long bookId, BookState newState);%0A%7D%0A

Add BookFacade