class BookViewModel {
  
  @WireVariable
  private List<Book> bookList;
  private Book selectedBook;
  private BookService bookService = new BookServiceImpl();
  
  public Book getSelectedBook() {
    return selectedBook;
  }

  @NotifyChange("selectedBook")
  public void setSelectedBook(Book selectedBook) {
    this.selectedBook = selectedBook;
  }

  public List<Book> getBookList() {
    return bookService.load();
  }
  
  /** Deleting a book.
   * When event is triggered on click of Delete button, 
   * this method will be notified with the selected entry that will be referenced
   * and used to delete the selected book from the list of books. 
   */
  @Command
  @NotifyChange({"selectedBook", "bookList"})
  public void deleteBook() {<FILL_FUNCTION_BODY>}

}

    if (selectedBook != null) {
      getBookList().remove(selectedBook);
      selectedBook = null;
    }
  
<no_super_class>