OSID Logo
OSID Specifications
inventory package
Version 3.1.0
Interfaceosid.inventory.ModelSearchSession
Implementsosid.inventory.ModelQuerySession
Used Byosid.inventory.InventoryManager
osid.inventory.InventoryProxyManager
Description

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.

MethodgetModelSearch
Description

Gets a model search.

Returnosid.inventory.ModelSearch the model search
Compliancemandatory This 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.ModelSearchOrder the model search order
Compliancemandatory This method must be implemented.
MethodgetModelsBySearch
Description

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

Parametersosid.inventory.ModelQuerymodelQuery the model query
osid.inventory.ModelSearchmodelSearch the model search
Returnosid.inventory.ModelSearchResults the model search results
ErrorsNULL_ARGUMENT modelQuery or modelSearch is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED modelQuery or modelSearch is not of this service
Compliancemandatory This method must be implemented.
MethodgetModelQueryFromInspector
Description

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

Parametersosid.assessment.ItemQueryInspectormodelQueryInspector a model query inspector
Returnosid.inventory.ModelQuery the model query
ErrorsNULL_ARGUMENT modelQueryInspector is null
UNSUPPORTED modelQueryInspector is not of this service
Compliancemandatory This method must be implemented.