Interface CommentSearchSession

All Superinterfaces:
AutoCloseable, Closeable, CommentQuerySession, OsidSession, OsidSession

public interface CommentSearchSession extends CommentQuerySession

This session provides methods for searching Comments . The search query is constructed using the CommentQuery . The comment record Type also specifies the record for the comment query.

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

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

  • Method Details

    • getCommentSearch

      CommentSearch getCommentSearch()
      Gets a comment search.
      Returns:
      the comment search
      Compliance:
      mandatory - This method must be implemented.
    • getCommentSearchOrder

      CommentSearchOrder getCommentSearchOrder()
      Gets a comment search order. The CommentSearchOrder is supplied to a CommentSearch to specify the ordering of results.
      Returns:
      the comment search order
      Compliance:
      mandatory - This method must be implemented.
    • getCommentsBySearch

      CommentSearchResults getCommentsBySearch(CommentQuery commentQuery, CommentSearch commentSearch) throws OperationFailedException, PermissionDeniedException
      Gets the search results matching the given search.
      Parameters:
      commentQuery - the comment query
      commentSearch - the comment search
      Returns:
      the search results
      Throws:
      NullArgumentException - commentQuery or commentSearch is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - commentQuery or commentSearch is not of this service
      Compliance:
      mandatory - This method must be implemented.
    • getCommentQueryFromInspector

      CommentQuery getCommentQueryFromInspector(CommentQueryInspector commentQueryInspector)
      Gets an entry query from an inspector. The inspector is available from an CommentSearchResults .
      Parameters:
      commentQueryInspector - a comment query inspector
      Returns:
      the entry query
      Throws:
      NullArgumentException - commentQueryInspector is null
      UnsupportedException - commentQueryInspector is not of this service
      Compliance:
      mandatory - This method must be implemented.