OSID Logo
OSID Specifications
recipe package
Version 3.0.0
Release Candidate Preview
Interfaceosid.recipe.IngredientQuery
Implementsosid.OsidObjectQuery
osid.OsidSubjugateableQuery
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.

Parameterscardinallowstarting of range
cardinalhighend of range
booleanmatch true for a positive match, false for a negative match
ErrorsINVALID_ARGUMENT low is greater than high
CompliancemandatoryThis 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
CompliancemandatoryThis method must be implemented.
MethodclearQuantityTerms
Description

Clears the quantity query terms.

CompliancemandatoryThis method must be implemented.
MethodmatchUnitType
Description

Matches ingredients with a unit type.

Parametersosid.type.TypeunitTypea unit type
booleanmatch true for a positive match, false for a negative match
ErrorsNULL_ARGUMENT unitType is null
CompliancemandatoryThis 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
CompliancemandatoryThis method must be implemented.
MethodclearUnitTypeTerms
Description

Clears the unit type query terms.

CompliancemandatoryThis method must be implemented.
MethodmatchStockId
Description

Sets the stock Id for this query.

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

Clears the stock Id query terms.

CompliancemandatoryThis method must be implemented.
MethodsupportsStockQuery
Description

Tests if a StockQuery is available.

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

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

Returnosid.inventory.StockQuerythe stock query
ErrorsUNIMPLEMENTED supportsStockQuery() is false
ComplianceoptionalThis 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
CompliancemandatoryThis method must be implemented.
MethodclearStockTerms
Description

Clears the stock query terms.

CompliancemandatoryThis 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.TypeingredientRecordTypean ingredient record type
Returnosid.recipe.records.IngredientQueryRecordthe ingredient query record
ErrorsNULL_ARGUMENT ingredientRecordType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure occurred
UNSUPPORTED hasRecordType(ingredientRecordType) is false
CompliancemandatoryThis method must be implemented.