Package com.sap.cds.ql.cqn
Interface CqnInPredicate
- All Superinterfaces:
CqnExpression,CqnPredicate,CqnToken,CqnValue,JSONizable
- All Known Subinterfaces:
CqnEtagPredicate
The
in predicate tests wether an actual value is
equal to any value from a defined value set.
It evaluates to false if the value set is empty.-
Method Summary
Modifier and TypeMethodDescriptiondefault voidaccept(CqnVisitor visitor) Traverses the expression tree represented by this token with a givenvisitor.value()The actualCqnValuethat is tested against the values given byvalueSet().default Collection<CqnValue>values()Returns the collection of expected values in casevalueSet()is aCqnListValue, otherwise aClassCastExceptionis thrown.valueSet()Defines the set of expected values theactual valueis tested against.Methods inherited from interface com.sap.cds.ql.cqn.CqnExpression
asArithmeticExpression, asCaseExpression, asExpression, asNegation, isArithmeticExpression, isCaseExpression, isExpression, isNegation, toJsonMethods inherited from interface com.sap.cds.ql.cqn.CqnPredicate
asPredicate, isPredicateMethods inherited from interface com.sap.cds.ql.cqn.CqnValue
as, asFunction, asList, asLiteral, asNullValue, asParameter, asPlain, asRef, isFunction, isList, isLiteral, isNullValue, isParameter, isPlain, isRef, ofLiteral, ofRef, type
-
Method Details
-
value
CqnValue value()The actualCqnValuethat is tested against the values given byvalueSet().- Returns:
- the actual
CqnValue
-
values
Returns the collection of expected values in casevalueSet()is aCqnListValue, otherwise aClassCastExceptionis thrown.- Returns:
- the expected values
- Throws:
ClassCastException- if this value is not aCqnListValue
-
valueSet
CqnValue valueSet()Defines the set of expected values theactual valueis tested against. The returnedCqnValuecan either be aCqnListValuecontaining all expected values, aCqnReferencepointing to a collection-valued element, or aCqnParameterpointing to a collection of values.- Returns:
- the set of expected values
-
accept
Description copied from interface:CqnTokenTraverses the expression tree represented by this token with a givenvisitor. The traversal order is depth-first. If this token has child nodes they are traversed first by dispatching the visitor to the children'sacceptmethods. Afterwards this token is passed to the visitor'svisitmethod specific for this token's type.- Specified by:
acceptin interfaceCqnExpression- Specified by:
acceptin interfaceCqnToken- Parameters:
visitor- theCqnVisitor
-