OSID Logo
OSID Specifications
inventory package
Version 3.0.0
Release Candidate Preview
Interfaceosid.inventory.StockQuery
Implementsosid.OsidObjectQuery
osid.OsidFederateableQuery
Description

This is the query for searching stocks. Each method match specifies an AND term while multiple invocations of the same method produce a nested OR.

MethodmatchSKU
Description

Matches a sku number.

Parametersstringskua sku
osid.type.TypestringMatchTypea string match type
booleanmatch true if a positive match, false for a negative match
ErrorsNULL_ARGUMENT sku or stringMatchType is null
UNSUPPORTED supportsStringMatchType(stringMatchType) is false
CompliancemandatoryThis method must be implemented.
MethodmatchAnySKU
Description

Matches items that have any sku.

Parametersbooleanmatch true to match items with any sku, false to match items with no sku
CompliancemandatoryThis method must be implemented.
MethodclearSKUTerms
Description

Clears the sku terms.

CompliancemandatoryThis method must be implemented.
MethodmatchModelId
Description

Sets the model Id for this query.

Parametersosid.id.IdmodelIda model Id
booleanmatch true if a positive match, false for a negative match
ErrorsNULL_ARGUMENT modelId is null
CompliancemandatoryThis method must be implemented.
MethodclearModelIdTerms
Description

Clears the model Id terms.

CompliancemandatoryThis method must be implemented.
MethodsupportsModelQuery
Description

Tests if a ModelQuery is available.

Returnboolean true if a model query is available, false otherwise
CompliancemandatoryThis method must be implemented.
MethodgetModelQuery
Description

Gets the query for an inventory. Multiple retrievals produce a nested OR term.

Returnosid.inventory.ModelQuerythe model query
ErrorsUNIMPLEMENTED supportsModelQuery() is false
ComplianceoptionalThis method must be implemented if supportsModelQuery() is true.
MethodmatchAnyModel
Description

Matches any related model.

Parametersbooleanmatch true to match stocks with any model, false to match stocks with no models
CompliancemandatoryThis method must be implemented.
MethodclearModelTerms
Description

Clears the model terms.

CompliancemandatoryThis method must be implemented.
MethodmatchLocationDescription
Description

Matches a location description.

Parametersstringlocationa location string
osid.type.TypestringMatchTypea string match type
booleanmatch true if a positive match, false for a negative match
ErrorsNULL_ARGUMENT location or stringMatchType is null
UNSUPPORTED supportsStringMatchType(stringMatchType) is false
CompliancemandatoryThis method must be implemented.
MethodmatchAnyLocationDescription
Description

Matches items that have any location description.

Parametersbooleanmatch true to match stocks with any location string, false to match stocks with no location string
CompliancemandatoryThis method must be implemented.
MethodclearLocationDescriptionTerms
Description

Clears the location description terms.

CompliancemandatoryThis method must be implemented.
MethodmatchLocationId
Description

Sets the location Id for this query.

Parametersosid.id.IdlocationIdthe location Id
booleanmatch true for a positive match, false for a negative match
ErrorsNULL_ARGUMENT locationId is null
CompliancemandatoryThis method must be implemented.
MethodclearLocationIdTerms
Description

Clears the location Id terms.

CompliancemandatoryThis method must be implemented.
MethodsupportsLocationQuery
Description

Tests if a LocationQuery is available.

Returnboolean true if a location query is available, false otherwise
CompliancemandatoryThis method must be implemented.
MethodgetLocationQuery
Description

Gets the query for a location. Multiple retrievals produce a nested OR term.

Returnosid.mapping.LocationQuerythe location query
ErrorsUNIMPLEMENTED supportsLocationQuery() is false
ComplianceoptionalThis method must be implemented if supportsLocationQuery() is true.
MethodmatchAnyLocation
Description

Matches items that have any location.

Parametersbooleanmatch true to match stocks with any location, false to match stocks with no location
CompliancemandatoryThis method must be implemented.
MethodclearLocationTerms
Description

Clears the location terms.

CompliancemandatoryThis method must be implemented.
MethodmatchAncestorStockId
Description

Sets the stock Id for this query to match stocks that have the specified stock as an ancestor.

Parametersosid.id.IdstockIda stock Id
booleanmatch true for a positive match, false for a negative match
ErrorsNULL_ARGUMENT stockId is null
CompliancemandatoryThis method must be implemented.
MethodclearAncestorStockIdTerms
Description

Clears the ancestor stock Id query terms.

CompliancemandatoryThis method must be implemented.
MethodsupportsAncestorStockQuery
Description

Tests if a StockQuery is available.

Returnboolean true if a stock query is available, false otherwise
CompliancemandatoryThis method must be implemented.
MethodgetAncestorStockQuery
Description

Gets the query for a stock. Multiple retrievals produce a nested OR term.

Returnosid.inventory.StockQuerythe stock query
ErrorsUNIMPLEMENTED supportsAncestorStockQuery() is false
ComplianceoptionalThis method must be implemented if supportsAncestorStockQuery() is true.
MethodmatchAnyAncestorStock
Description

Matches stocks with any stock ancestor.

Parametersbooleanmatch true to match stocks with any ancestor, false to match root stocks
CompliancemandatoryThis method must be implemented.
MethodclearAncestorStockTerms
Description

Clears the ancestor stock query terms.

CompliancemandatoryThis method must be implemented.
MethodmatchDescendantStockId
Description

Sets the stock Id for this query to match stocks that have the specified stock as an descendant.

Parametersosid.id.IdstockIda stock Id
booleanmatch true for a positive match, false for a negative match
ErrorsNULL_ARGUMENT stockId is null
CompliancemandatoryThis method must be implemented.
MethodclearDescendantStockIdTerms
Description

Clears the descendant stock Id query terms.

CompliancemandatoryThis method must be implemented.
MethodsupportsDescendantStockQuery
Description

Tests if a StockQuery is available.

Returnboolean true if a stock query is available, false otherwise
CompliancemandatoryThis method must be implemented.
MethodgetDescendantStockQuery
Description

Gets the query for a stock. Multiple retrievals produce a nested OR term.

Returnosid.inventory.StockQuerythe stock query
ErrorsUNIMPLEMENTED supportsDescendantStockQuery() is false
ComplianceoptionalThis method must be implemented if supportsDescendantStockQuery() is true.
MethodmatchAnyDescendantStock
Description

Matches stocks with any descendant stock.

Parametersbooleanmatch true to match stocks with any descendant, false to match leaf stocks
CompliancemandatoryThis method must be implemented.
MethodclearDescendantStockTerms
Description

Clears the descendant stock query terms.

CompliancemandatoryThis method must be implemented.
MethodmatchWarehouseId
Description

Sets the warehouse Id for this query to match stocks assigned to warehouses.

Parametersosid.id.IdwarehouseIdthe warehouse Id
booleanmatch true for a positive match, false for a negative match
ErrorsNULL_ARGUMENT warehouseId is null
CompliancemandatoryThis method must be implemented.
MethodclearWarehouseIdTerms
Description

Clears the warehouse Id query terms.

CompliancemandatoryThis method must be implemented.
MethodsupportsWarehouseQuery
Description

Tests if a WarehouseQuery is available.

Returnboolean true if a warehouse query is available, false otherwise
CompliancemandatoryThis method must be implemented.
MethodgetWarehouseQuery
Description

Gets the query for a warehouse. Multiple retrievals produce a nested OR term.

Returnosid.inventory.WarehouseQuerythe warehouse query
ErrorsUNIMPLEMENTED supportsWarehouseQuery() is false
ComplianceoptionalThis method must be implemented if supportsWarehouseQuery() is true.
MethodclearWarehouseTerms
Description

Clears the warehouse terms.

CompliancemandatoryThis method must be implemented.
MethodgetStockQueryRecord
Description

Gets the stock query record corresponding to the given Stock record Type. Multiple record retrievals produce a nested OR term.

Parametersosid.type.TypestockRecordTypea stock record type
Returnosid.inventory.records.StockQueryRecordthe stock query record
ErrorsNULL_ARGUMENT stockRecordType is null
OPERATION_FAILEDunable to complete request
UNSUPPORTED hasRecordType(stockRecordType) is false
CompliancemandatoryThis method must be implemented.