Interface BookSearchSession

All Superinterfaces:
AutoCloseable, BookQuerySession, Closeable, OsidSession, OsidSession

public interface BookSearchSession extends BookQuerySession

This session provides methods for searching Books. The search query is constructed using the BookQuery. The book record Type also specifies the record for the book query.

getBooksByQuery() is the basic search method and returns a list of Book elements. A more advanced search may be performed with getBooksBySearch(). It accepts a BookSearch in addition to the query for the purpose of specifying additional options affecting the entire search, such as ordering. getBooksBySearch() returns a BookSearchResults that can be used to access the resulting BookList or be used to perform a search within the result set through BookSearch.

Books may have a query record indicated by their respective record types. The query record is accessed via the BookQuery. The returns in this session may not be cast directly to these interfaces.

  • Method Details

    • getBookSearch

      BookSearch getBookSearch()
      Gets a book search.
      Returns:
      the book search
      Compliance:
      mandatory - This method must be implemented.
    • getBookSearchOrder

      BookSearchOrder getBookSearchOrder()
      Gets a book search order. The BookSearchOrder is supplied to a BookSearch to specify the ordering of results.
      Returns:
      the book search order
      Compliance:
      mandatory - This method must be implemented.
    • getBooksBySearch

      Gets the search results matching the given search.
      Parameters:
      bookQuery - the book query
      bookSearch - the book search
      Returns:
      the search results
      Throws:
      NullArgumentException - bookQuery or bookSearch is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - bookQuery or bookSearch is not of this service
      Compliance:
      mandatory - This method must be implemented.
    • getBookQueryFromInspector

      BookQuery getBookQueryFromInspector(BookQueryInspector bookQueryInspector)
      Gets an entry query from an inspector. The inspector is available from an BookSearchResults.
      Parameters:
      bookQueryInspector - a book query inspector
      Returns:
      the book query
      Throws:
      NullArgumentException - bookQueryInspector is null
      UnsupportedException - bookQueryInspector is not of this service
      Compliance:
      mandatory - This method must be implemented.