Interface GradeSearchSession

All Superinterfaces:
AutoCloseable, Closeable, GradeQuerySession, OsidSession, OsidSession

public interface GradeSearchSession extends GradeQuerySession

This session provides methods for searching among Grades . The search query is constructed using the GradeQuery .

getGradesByQuery() is the basic search method and returns a list of Grades . A more advanced search may be performed with getGradesBySearch() . It accepts a GradeSearch in addition to the query for the purpose of specifying additional options affecting the entire search, such as ordering. getGradesBySearch() returns a GradeSearchResults that can be used to access the resulting GradeList or be used to perform a search within the result set through Gra deSearch .

This session defines views that offer differing behaviors for searching.

  • federated gradebook view: searches include grades in gradebooks of which this gradebook is an ancestor in the gradebook hierarchy
  • isolated gradebook view: searches are restricted to grades in this gradebook

Grades may have a query record indicated by their respective record types. The query record is accessed via the GradeQuery .

  • Method Details

    • getGradeSearch

      GradeSearch getGradeSearch()
      Gets a grade search.
      Returns:
      the grade search
      Compliance:
      mandatory - This method must be implemented.
    • getGradeSearchOrder

      GradeSearchOrder getGradeSearchOrder()
      Gets a grade search order. The GradeSearchOrder is supplied to a GradeSearch to specify the ordering of results.
      Returns:
      the grade search order
      Compliance:
      mandatory - This method must be implemented.
    • getGradesBySearch

      Gets the search results matching the given search query using the given search.
      Parameters:
      gradeQuery - the grade query
      gradeSearch - the grade search
      Returns:
      the returned search results
      Throws:
      NullArgumentException - gradeQuery or gradeSearch is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - gradeQuery or gradeSearch is not of this service
      Compliance:
      mandatory - This method must be implemented.
    • getGradeQueryFromInspector

      GradeQuery getGradeQueryFromInspector(GradeQueryInspector gradeQueryInspector)
      Gets a grade query from an inspector. The inspector is available from a GradeSearchResults .
      Parameters:
      gradeQueryInspector - a grade query inspector
      Returns:
      the grade query
      Throws:
      NullArgumentException - gradeQueryInspector is null
      UnsupportedException - gradeQueryInspector is not of this service
      Compliance:
      mandatory - This method must be implemented.