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

This session provides methods for searching among Stocks. 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.StockSearch the stock search
Compliancemandatory This 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.StockSearchOrder the stock search order
Compliancemandatory This method must be implemented.
MethodgetStocksBySearch
Description

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

Parametersosid.inventory.StockQuerystockQuery the stock query
osid.inventory.StockSearchstockSearch the stock search
Returnosid.inventory.StockSearchResults the stock search results
ErrorsNULL_ARGUMENT stockQuery or stockSearch is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED stockQuery or stockSearch is not of this service
Compliancemandatory This method must be implemented.
MethodgetStockQueryFromInspector
Description

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

Parametersosid.assessment.ItemQueryInspectorstockQueryInspector a stock query inspector
Returnosid.inventory.StockQuery the stock query
ErrorsNULL_ARGUMENT stockQueryInspector is null
UNSUPPORTED stockQueryInspector is not of this service
Compliancemandatory This method must be implemented.