Package com.sap.cds.ql.cqn
Interface CqnInPredicate
-
- All Superinterfaces:
CqnExpression
,CqnPredicate
,CqnToken
,CqnValue
,JSONizable
public interface CqnInPredicate extends CqnPredicate
Thein
predicate tests wether anactual value
is equal to any value from a definedvalue set
. It evaluates tofalse
if the value set is empty.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
accept(CqnVisitor visitor)
Traverses the expression tree represented by this token with a givenvisitor
.CqnValue
value()
The actualCqnValue
that is tested against the values given byvalueSet()
.default Collection<CqnValue>
values()
Returns the collection of expected values in casevalueSet()
is aCqnListValue
, otherwise aClassCastException
is thrown.CqnValue
valueSet()
Defines the set of expected values theactual value
is tested against.-
Methods inherited from interface com.sap.cds.ql.cqn.CqnExpression
asArithmeticExpression, asExpression, asNegation, isArithmeticExpression, isExpression, isNegation, toJson
-
Methods inherited from interface com.sap.cds.ql.cqn.CqnPredicate
asPredicate, isPredicate
-
Methods inherited from interface com.sap.cds.ql.cqn.CqnValue
as, asFunction, asList, asLiteral, asNullValue, asParameter, asPlain, asRef, isFunction, isList, isLiteral, isNullValue, isParameter, isPlain, isRef, ofRef, type
-
-
-
-
Method Detail
-
value
CqnValue value()
The actualCqnValue
that is tested against the values given byvalueSet()
.- Returns:
- the actual
CqnValue
-
values
default Collection<CqnValue> values()
Returns the collection of expected values in casevalueSet()
is aCqnListValue
, otherwise aClassCastException
is thrown.- Returns:
- the expected values
- Throws:
ClassCastException
- if this value is not aCqnListValue
-
valueSet
CqnValue valueSet()
Defines the set of expected values theactual value
is tested against. Given as aCqnListValue
containing all expected values, as aCqnReference
pointing to a collection-valued element or aCqnParameter
pointing to a collection of values.- Returns:
- the set of expected values
-
accept
default void accept(CqnVisitor visitor)
Description copied from interface:CqnToken
Traverses 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'saccept
methods. Afterwards this token is passed to the visitor'svisit
method specific for this token's type.- Specified by:
accept
in interfaceCqnExpression
- Specified by:
accept
in interfaceCqnToken
- Parameters:
visitor
- theCqnVisitor
-
-