Package com.sap.cds.ql.cqn
Interface CqnValue
- All Superinterfaces:
CqnToken,JSONizable
- All Known Subinterfaces:
BooleanFunction,BooleanValue,CqnArithmeticExpression,CqnArithmeticNegation,CqnBetweenPredicate,CqnBooleanLiteral,CqnCaseExpression,CqnComparisonPredicate,CqnConnectivePredicate,CqnContainmentTest,CqnElementRef,CqnEtagPredicate,CqnExistsSubquery,CqnExpression,CqnFunc,CqnInPredicate,CqnInSubquery,CqnListValue,CqnLiteral<T>,CqnMatchPredicate,CqnNegation,CqnNullValue,CqnNumericLiteral<N>,CqnParameter,CqnPassThroughSearchPredicate,CqnPlain,CqnPredicate,CqnSearchPredicate,CqnSearchTermPredicate,CqnStringLiteral,CqnStructuredLiteral,CqnTemporalLiteral<E>,CqnVector,CqnWindowFunc,ElementRef<T>,FunctionCall<T>,Literal<T>,NullValue,Parameter<T>,Predicate,SelectableValue,Value<T>,WindowFunctionCall<T>
-
Method Summary
Modifier and TypeMethodDescriptiondefault <T extends CqnValue>
TCasts this type to the giventype.default CqnExpressionCasts this value toCqnExpression.default CqnFuncCasts this value toCqnFunc.default CqnListValueasList()Casts this value toCqnListValue.default CqnLiteral<?>Casts this value toCqnLiteral.default CqnNullValueCasts this value toCqnNullValue.default CqnParameterCasts this value toCqnParameter.default CqnPlainasPlain()Casts this value toCqnPlain.default CqnElementRefasRef()Casts this value toCqnElementRef.default booleanReturnstrueif this is aCqnExpression.default booleanReturnstrueif this is aCqnFunc.default booleanisList()Returnstrueif this is aCqnListValuevalue.default booleanReturnstrueif this is aCqnLiteral.default booleanReturnstrueif this is aCqnNullValue.default booleanReturnstrueif this is aCqnParameter.default booleanisPlain()Returnstrueif this is aCqnPlainvalue.default booleanisRef()Returnstrueif this is aCqnElementRef.default Stream<CqnLiteral<?>>default Stream<CqnElementRef>ofRef()type()Returns the optional CDS type of this value.Methods inherited from interface com.sap.cds.JSONizable
toJson
-
Method Details
-
type
Returns the optional CDS type of this value.- Returns:
- the optional CDS type
-
isRef
default boolean isRef()Returnstrueif this is aCqnElementRef.- Returns:
trueif this is an element ref, otherwisefalse
-
isExpression
default boolean isExpression()Returnstrueif this is aCqnExpression.- Returns:
trueif this is an expression, otherwisefalse
-
isFunction
default boolean isFunction()Returnstrueif this is aCqnFunc.- Returns:
trueif this is a function, otherwisefalse
-
isLiteral
default boolean isLiteral()Returnstrueif this is aCqnLiteral.- Returns:
trueif this is a literal, otherwisefalse
-
isNullValue
default boolean isNullValue()Returnstrueif this is aCqnNullValue.- Returns:
trueif this is a null value, otherwisefalse
-
isParameter
default boolean isParameter()Returnstrueif this is aCqnParameter.- Returns:
trueif this is a parameter, otherwisefalse
-
isPlain
default boolean isPlain()Returnstrueif this is aCqnPlainvalue.- Returns:
trueif this is a plain value, otherwisefalse
-
isList
default boolean isList()Returnstrueif this is aCqnListValuevalue.- Returns:
trueif this is a list value, otherwisefalse
-
asRef
Casts this value toCqnElementRef.- Returns:
- this value as an element ref
- Throws:
ClassCastException- if this value is not an element ref
-
ofRef
-
asExpression
Casts this value toCqnExpression.- Returns:
- this value as an expression
- Throws:
ClassCastException- if this value is not an expression
-
asFunction
Casts this value toCqnFunc.- Returns:
- this value as a function
- Throws:
ClassCastException- if this value is not a function
-
asLiteral
Casts this value toCqnLiteral.- Returns:
- this value as a literal
- Throws:
ClassCastException- if this value is not a literal
-
ofLiteral
-
asNullValue
Casts this value toCqnNullValue.- Returns:
- this value as a null value
- Throws:
ClassCastException- if this value is not a null value
-
asParameter
Casts this value toCqnParameter.- Returns:
- this value as a parameter
- Throws:
ClassCastException- if this value is not a parameter
-
asPlain
Casts this value toCqnPlain.- Returns:
- this value as a plain value
- Throws:
ClassCastException- if this value is not a plain value
-
asList
Casts this value toCqnListValue.- Returns:
- this value as a list value
- Throws:
ClassCastException- if this value is not a list value
-
as
Casts this type to the giventype.- Type Parameters:
T- the return type- Parameters:
type- the subtype ofCqnValueto cast to- Returns:
- this type casted to the given
typeclass
-