OSID Logo
OSID Specifications
inventory package
Version 3.0.0
Release Candidate Preview
Interfaceosid.inventory.ModelSearchSession
Implementsosid.inventory.ModelQuerySession
Description

This session provides methods for searching among Model objects. 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.

MethodgetModelSearch
Description

Gets a model search.

Returnosid.inventory.ModelSearchthe model search
CompliancemandatoryThis method must be implemented.
MethodgetModelSearchOrder
Description

Gets a model search order. The ModelSearchOrder is supplied to a ModelSearch to specify the ordering of results.

Returnosid.inventory.ModelSearchOrderthe model search order
CompliancemandatoryThis method must be implemented.
MethodgetModelsBySearch
Description

Gets the search results matching the given search query using the given search.

Parametersosid.inventory.ModelQuerymodelQuerythe model query
osid.inventory.ModelSearchmodelSearchthe model search
Returnosid.inventory.ModelSearchResultsthe model search results
ErrorsNULL_ARGUMENT modelQuery or modelSearch is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED modelQuery or modelSearch is not of this service
CompliancemandatoryThis method must be implemented.
MethodgetModelQueryFromInspector
Description

Gets a model query from an inspector. The inspector is available from a ModelSearchResults.

Parametersosid.assessment.ItemQueryInspectormodelQueryInspectora model query inspector
Returnosid.inventory.ModelQuerythe model query
ErrorsNULL_ARGUMENT modelQueryInspector is null
UNSUPPORTED modelQueryInspector is not of this service
CompliancemandatoryThis method must be implemented.