Methods Summary |
---|
public void | destroy()Set the database to null so that it can be garbage collected.
books = null;
|
public BookDetails | getBookDetails(java.lang.String bookId)Return information about the book associated with the given
book identifier.
return books.getBookDetails(bookId);
|
public BookDetails[] | getBooksSortedByTitle()Return information about all the books in the bookstore.
Sort the books into alphabetical order using their title
as the key.
return books.getBooksSortedByTitle();
|
public int | getNumberOfBooks()Return the number of books in the bookstore database.
return books.getNumberOfBooks();
|
public void | init()Initialize the book database, and store it in this.
// Load the database to prepare for requests
books = new BookStoreDB();
|
public static database.BookDBFrontEnd | instance()Static factory method that makes a single instance of this
class.
if (onlyInstance == null)
onlyInstance = new BookDBFrontEnd();
return onlyInstance;
|