Interface UtilitySearchSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession, UtilityQuerySession

public interface UtilitySearchSession extends UtilityQuerySession

This session provides methods for searching Utility objects. The search query is constructed using the UtilityQuery . The utility record Type also specifies the recod for the utility query.

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

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

  • Method Details

    • getUtilitySearch

      UtilitySearch getUtilitySearch()
      Gets a utility search.
      Returns:
      the utility search
      Compliance:
      mandatory - This method must be implemented.
    • getUtilitySearchOrder

      UtilitySearchOrder getUtilitySearchOrder()
      Gets a utility search order. The UtilitySearchOrder is supplied to a UtilitySearch to specify the ordering of results.
      Returns:
      the utility search order
      Compliance:
      mandatory - This method must be implemented.
    • getUtilitiesBySearch

      UtilitySearchResults getUtilitiesBySearch(UtilityQuery utilityQuery, UtilitySearch utilitySearch) throws OperationFailedException, PermissionDeniedException
      Gets the search results matching the given search.
      Parameters:
      utilityQuery - the utility query
      utilitySearch - the utility search
      Returns:
      the utility search results
      Throws:
      NullArgumentException - utilityQuery or utilitySearch is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - utilityQuery or utilitySearch is not of this service
      Compliance:
      mandatory - This method must be implemented.
    • getUtilityQueryFromInspector

      UtilityQuery getUtilityQueryFromInspector(UtilityQueryInspector utilityQueryInspector)
      Gets a utility query from an inspector. The inspector is available from a UtilitySearchResults .
      Parameters:
      utilityQueryInspector - a utility query inspector
      Returns:
      the utility query
      Throws:
      NullArgumentException - utilityQueryInspector is null
      UnsupportedException - utilityQueryInspector is not of this service
      Compliance:
      mandatory - This method must be implemented.