public interface IngredientQuery extends OsidObjectQuery, OsidSubjugateableQuery
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.
| Modifier and Type | Method and Description |
|---|---|
void |
clearQuantityTerms()
Clears the quantity query terms.
|
void |
clearStockIdTerms()
Clears the stock
Id query terms. |
void |
clearStockTerms()
Clears the stock query terms.
|
void |
clearUnitTypeTerms()
Clears the unit type query terms.
|
IngredientQueryRecord |
getIngredientQueryRecord(Type ingredientRecordType)
Gets the ingredient query record corresponding to the given
Ingredient record Type. |
StockQuery |
getStockQuery()
Gets the query for a stock.
|
void |
matchAnyQuantity(boolean match)
Matches ingredients with any quantity.
|
void |
matchAnyStock(boolean match)
Matches ingredients with any stock.
|
void |
matchAnyUnitType(boolean match)
Matches ingredients with any unit type.
|
void |
matchQuantity(long low,
long high,
boolean match)
Matches ingredients with quantity between the given range inclusive.
|
void |
matchStockId(Id stockId,
boolean match)
Sets the stock
Id for this query. |
void |
matchUnitType(Type unitType,
boolean match)
Matches ingredients with a unit type.
|
boolean |
supportsStockQuery()
Tests if a
StockQuery is available. |
clearCommentIdTerms, clearCommentTerms, clearCreditIdTerms, clearCreditTerms, clearDescriptionTerms, clearDisplayNameTerms, clearGenusTypeTerms, clearJournalEntryIdTerms, clearJournalEntryTerms, clearParentGenusTypeTerms, clearRelationshipIdTerms, clearRelationshipPeerIdTerms, clearRelationshipTerms, clearStateIdTerms, clearStateTerms, clearStatisticTerms, clearSubjectIdTerms, clearSubjectRelevancyTerms, clearSubjectTerms, getCommentQuery, getCreditQuery, getJournalEntryQuery, getRelationshipQuery, getStateQuery, getStatisticQuery, getSubjectQuery, getSubjectRelevancyQuery, matchAnyComment, matchAnyCredit, matchAnyDescription, matchAnyDisplayName, matchAnyGenusType, matchAnyJournalEntry, matchAnyRelationship, matchAnyState, matchAnyStatistic, matchAnySubject, matchCommentId, matchCreditId, matchDescription, matchDisplayName, matchGenusType, matchJournalEntryId, matchParentGenusType, matchRelationshipId, matchRelationshipPeerId, matchStateId, matchSubjectId, supportsCommentQuery, supportsCreditQuery, supportsJournalEntryQuery, supportsRelationshipQuery, supportsStateQuery, supportsStatisticQuery, supportsSubjectQuery, supportsSubjectRelevancyQueryclearIdTerms, matchIdclearRecordTerms, matchAnyRecord, matchRecordTypegetRecordTypes, hasRecordTypeclearAnyTerms, clearKeywordTerms, getStringMatchTypes, matchAny, matchKeyword, supportsStringMatchTypevoid matchQuantity(long low,
long high,
boolean match)
low - starting of rangehigh - end of rangematch - true for a positive match, false
for a negative matchInvalidArgumentException - low is
greater than high mandatory - This method must be implemented. void matchAnyQuantity(boolean match)
match - true to match ingredients with any
quantity, false to match ingredients with no
quantitymandatory - This method must be implemented. void clearQuantityTerms()
mandatory - This method must be implemented. void matchUnitType(Type unitType, boolean match)
unitType - a unit typematch - true for a positive match, false
for a negative matchNullArgumentException - unitType is
null mandatory - This method must be implemented. void matchAnyUnitType(boolean match)
match - true to match ingredients with any unit
type, false to match ingredients with no unit
typemandatory - This method must be implemented. void clearUnitTypeTerms()
mandatory - This method must be implemented. void matchStockId(Id stockId, boolean match)
Id for this query.stockId - the stock Id match - true for a positive match, false
for a negative matchNullArgumentException - stockId is
null mandatory - This method must be implemented. void clearStockIdTerms()
Id query terms.mandatory - This method must be implemented. boolean supportsStockQuery()
StockQuery is available. true if a stock query is available,
false otherwisemandatory - This method must be implemented. StockQuery getStockQuery()
OR term.UnimplementedException - supportsStockQuery()
is false optional - This method must be implemented if
supportsStockQuery() is true. void matchAnyStock(boolean match)
match - true to match ingredients with any stock,
false to match ingredients with no stockmandatory - This method must be implemented. void clearStockTerms()
mandatory - This method must be implemented. IngredientQueryRecord getIngredientQueryRecord(Type ingredientRecordType) throws OperationFailedException, PermissionDeniedException
Ingredient record Type. Multiple record
retrievals produce a nested OR term.ingredientRecordType - an ingredient record typeNullArgumentException - ingredientRecordType
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failure
occurredUnsupportedException -
hasRecordType(ingredientRecordType) is false
mandatory - This method must be implemented.