OSID Logo
OSID Specifications
inventory package
Version 3.0.0
Release Candidate Preview
Interfaceosid.inventory.StockSearchSession
Implementsosid.inventory.StockQuerySession
Description

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

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

This session defines views that offer differing behaviors for searching.

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

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

MethodgetStockSearch
Description

Gets a stock search.

Returnosid.inventory.StockSearchthe stock search
CompliancemandatoryThis method must be implemented.
MethodgetStockSearchOrder
Description

Gets a stock search order. The StockSearchOrder is supplied to a StockSearch to specify the ordering of results.

Returnosid.inventory.StockSearchOrderthe stock search order
CompliancemandatoryThis method must be implemented.
MethodgetStocksBySearch
Description

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

Parametersosid.inventory.StockQuerystockQuerythe stock query
osid.inventory.StockSearchstockSearchthe stock search
Returnosid.inventory.StockSearchResultsthe stock search results
ErrorsNULL_ARGUMENT stockQuery or stockSearch is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED stockQuery or stockSearch is not of this service
CompliancemandatoryThis method must be implemented.
MethodgetStockQueryFromInspector
Description

Gets a stock query from an inspector. The inspector is available from a StockSearchResults.

Parametersosid.assessment.ItemQueryInspectorstockQueryInspectora stock query inspector
Returnosid.inventory.StockQuerythe stock query
ErrorsNULL_ARGUMENT stockQueryInspector is null
UNSUPPORTED stockQueryInspector is not of this service
CompliancemandatoryThis method must be implemented.