Interface StateSearchSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession, StateQuerySession

public interface StateSearchSession extends StateQuerySession

This session provides methods for searching among State objects. The search query is constructed using the StateQuery .

getStatesByQuery() is the basic search method and returns a list of States . A more advanced search may be performed with getStatesBySearch() . It accepts an StateSearch in addition to the query for the purpose of specifying additional options affecting the entire search, such as ordering. getStatesBySearch() returns an StateSearchResults that can be used to access the resulting StateList or be used to perform a search within the result set through StateList .

This session defines views that offer differing behaviors for searching.

  • federated process view: searches include states in processes of which this process is a ancestor in the process hierarchy
  • isolated process view: searches are restricted to states in this process

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

  • Method Details

    • getStateSearch

      StateSearch getStateSearch()
      Gets a state search.
      Returns:
      the state search
      Compliance:
      mandatory - This method must be implemented.
    • getStateSearchOrder

      StateSearchOrder getStateSearchOrder()
      Gets a state search order. The StateSearchOrder is supplied to a StateSearch to specify the ordering of results.
      Returns:
      the state search order
      Compliance:
      mandatory - This method must be implemented.
    • getStatesBySearch

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

      StateQuery getStateQueryFromInspector(StateQueryInspector stateQueryInspector)
      Gets a state query from an inspector. The inspector is available from a StateSearchResults .
      Parameters:
      stateQueryInspector - a state inspector
      Returns:
      the state query
      Throws:
      NullArgumentException - stateQueryInspector is null
      UnsupportedException - stateQueryInspector is not of this service
      Compliance:
      mandatory - This method must be implemented.