Package com.sap.cds.ql.cqn
Interface CqnValue
- All Superinterfaces:
CqnToken
,JSONizable
- All Known Subinterfaces:
BooleanFunction
,BooleanValue
,CqnArithmeticExpression
,CqnArithmeticNegation
,CqnBetweenPredicate
,CqnBooleanLiteral
,CqnComparisonPredicate
,CqnConnectivePredicate
,CqnContainmentTest
,CqnElementRef
,CqnEtagPredicate
,CqnExistsSubquery
,CqnExpression
,CqnFunc
,CqnInPredicate
,CqnListValue
,CqnLiteral<T>
,CqnMatchPredicate
,CqnNegation
,CqnNullValue
,CqnNumericLiteral<N>
,CqnParameter
,CqnPlain
,CqnPredicate
,CqnSearchPredicate
,CqnStringLiteral
,CqnStructuredLiteral
,CqnTemporalLiteral<E>
,ElementRef<T>
,FunctionCall<T>
,Literal<T>
,NullValue
,Parameter<T>
,Predicate
,Value<T>
-
Method Summary
Modifier and TypeMethodDescriptiondefault <T extends CqnValue>
TCasts this type to the giventype
.default CqnExpression
Casts this value toCqnExpression
.default CqnFunc
Casts this value toCqnFunc
.default CqnListValue
asList()
Casts this value toCqnListValue
.default CqnLiteral<?>
Casts this value toCqnLiteral
.default CqnNullValue
Casts this value toCqnNullValue
.default CqnParameter
Casts this value toCqnParameter
.default CqnPlain
asPlain()
Casts this value toCqnPlain
.default CqnElementRef
asRef()
Casts this value toCqnElementRef
.default boolean
Returnstrue
if this is aCqnExpression
.default boolean
Returnstrue
if this is aCqnFunc
.default boolean
isList()
Returnstrue
if this is aCqnListValue
value.default boolean
Returnstrue
if this is aCqnLiteral
.default boolean
Returnstrue
if this is aCqnNullValue
.default boolean
Returnstrue
if this is aCqnParameter
.default boolean
isPlain()
Returnstrue
if this is aCqnPlain
value.default boolean
isRef()
Returnstrue
if 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()Returnstrue
if this is aCqnElementRef
.- Returns:
true
if this is an element ref, otherwisefalse
-
isExpression
default boolean isExpression()Returnstrue
if this is aCqnExpression
.- Returns:
true
if this is an expression, otherwisefalse
-
isFunction
default boolean isFunction()Returnstrue
if this is aCqnFunc
.- Returns:
true
if this is a function, otherwisefalse
-
isLiteral
default boolean isLiteral()Returnstrue
if this is aCqnLiteral
.- Returns:
true
if this is a literal, otherwisefalse
-
isNullValue
default boolean isNullValue()Returnstrue
if this is aCqnNullValue
.- Returns:
true
if this is a null value, otherwisefalse
-
isParameter
default boolean isParameter()Returnstrue
if this is aCqnParameter
.- Returns:
true
if this is a parameter, otherwisefalse
-
isPlain
default boolean isPlain()Returnstrue
if this is aCqnPlain
value.- Returns:
true
if this is a plain value, otherwisefalse
-
isList
default boolean isList()Returnstrue
if this is aCqnListValue
value.- Returns:
true
if 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 ofCqnValue
to cast to- Returns:
- this type casted to the given
type
class
-