OSID Logo
OSID Specifications
recipe package
Version 3.1.0
Interfaceosid.recipe.IngredientQuery
Implementsosid.OsidObjectQuery
osid.OsidSubjugateableQuery
Used Byosid.recipe.DirectionQuery
Description

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

MethodmatchQuantity
Description

Matches ingredients with quantity between the given range inclusive.

Parameterscardinallow starting of range
cardinalhigh end of range
booleanmatch true for a positive match, false for a negative match
ErrorsINVALID_ARGUMENT low is greater than high
Compliancemandatory This method must be implemented.
MethodmatchAnyQuantity
Description

Matches ingredients with any quantity.

Parametersbooleanmatch true to match ingredients with any quantity, false to match ingredients with no quantity
Compliancemandatory This method must be implemented.
MethodclearQuantityTerms
Description

Clears the quantity query terms.

Compliancemandatory This method must be implemented.
MethodmatchUnitType
Description

Matches ingredients with a unit type.

Parametersosid.type.TypeunitType a unit type
booleanmatch true for a positive match, false for a negative match
ErrorsNULL_ARGUMENT unitType is null
Compliancemandatory This method must be implemented.
MethodmatchAnyUnitType
Description

Matches ingredients with any unit type.

Parametersbooleanmatch true to match ingredients with any unit type, false to match ingredients with no unit type
Compliancemandatory This method must be implemented.
MethodclearUnitTypeTerms
Description

Clears the unit type query terms.

Compliancemandatory This method must be implemented.
MethodmatchStockId
Description

Sets the stock Id for this query.

Parametersosid.id.IdstockId the stock Id
booleanmatch true for a positive match, false for a negative match
ErrorsNULL_ARGUMENT stockId is null
Compliancemandatory This method must be implemented.
MethodclearStockIdTerms
Description

Clears the stock Id query terms.

Compliancemandatory This method must be implemented.
MethodsupportsStockQuery
Description

Tests if a StockQuery is available.

Returnboolean true if a stock query is available, false otherwise
Compliancemandatory This method must be implemented.
MethodgetStockQuery
Description

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

Returnosid.inventory.StockQuery the stock query
ErrorsUNIMPLEMENTED supportsStockQuery() is false
Complianceoptional This method must be implemented if supportsStockQuery() is true.
MethodmatchAnyStock
Description

Matches ingredients with any stock.

Parametersbooleanmatch true to match ingredients with any stock, false to match ingredients with no stock
Compliancemandatory This method must be implemented.
MethodclearStockTerms
Description

Clears the stock query terms.

Compliancemandatory This method must be implemented.
MethodgetIngredientQueryRecord
Description

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

Parametersosid.type.TypeingredientRecordType an ingredient record type
Returnosid.recipe.records.IngredientQueryRecord the ingredient query record
ErrorsNULL_ARGUMENT ingredientRecordType is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure occurred
UNSUPPORTED hasRecordType(ingredientRecordType) is false
Compliancemandatory This method must be implemented.