Interface ModelSearchSession

All Superinterfaces:
AutoCloseable, Closeable, ModelQuerySession, OsidSession, OsidSession

public interface ModelSearchSession extends ModelQuerySession

This session provides methods for searching among Models . The search query is constructed using the ModelQuery .

getModelsByQuery() is the basic search method and returns a list of Models . A more advanced search may be performed with getModelsBySearch() . It accepts a ModelSearch in addition to the query for the purpose of specifying additional options affecting the entire search, such as ordering. getModelsBySearch() returns a ModelSearchResults that can be used to access the resulting ModelList or be used to perform a search within the result set through ModelSearch .

This session defines views that offer differing behaviors for searching.

  • federated warehouse view: searches include models in warehouses of which this warehouse is an ancestor in the warehouse hierarchy
  • isolated warehouse view: searches are restricted to models in this warehouse

Models may have a query record indicated by their respective record types. The queryrecord is accessed via the ModelQuery .

  • Method Details

    • getModelSearch

      ModelSearch getModelSearch()
      Gets a model search.
      Returns:
      the model search
      Compliance:
      mandatory - This method must be implemented.
    • getModelSearchOrder

      ModelSearchOrder getModelSearchOrder()
      Gets a model search order. The ModelSearchOrder is supplied to a ModelSearch to specify the ordering of results.
      Returns:
      the model search order
      Compliance:
      mandatory - This method must be implemented.
    • getModelsBySearch

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

      ModelQuery getModelQueryFromInspector(ItemQueryInspector modelQueryInspector)
      Gets a model query from an inspector. The inspector is available from a ModelSearchResults .
      Parameters:
      modelQueryInspector - a model query inspector
      Returns:
      the model query
      Throws:
      NullArgumentException - modelQueryInspector is null
      UnsupportedException - modelQueryInspector is not of this service
      Compliance:
      mandatory - This method must be implemented.