public interface CqnValue extends CqnToken
Modifier and Type | Method and Description |
---|---|
default <T extends CqnValue> |
as(Class<T> type)
Casts this type to the given
type . |
default CqnExpression |
asExpression()
Casts this value to
CqnExpression . |
default CqnFunc |
asFunction()
Casts this value to
CqnFunc . |
default CqnLiteral<?> |
asLiteral()
Casts this value to
CqnLiteral . |
default CqnNullValue |
asNullValue()
Casts this value to
CqnNullValue . |
default CqnParameter |
asParameter()
Casts this value to
CqnParameter . |
default CqnPlain |
asPlain()
Casts this value to
CqnPlain . |
default CqnElementRef |
asRef()
Casts this value to
CqnElementRef . |
default boolean |
isExpression()
Returns
true if this is a CqnExpression . |
default boolean |
isFunction()
Returns
true if this is a CqnFunc . |
default boolean |
isLiteral()
Returns
true if this is a CqnLiteral . |
default boolean |
isNullValue()
Returns
true if this is a CqnNullValue . |
default boolean |
isParameter()
Returns
true if this is a CqnParameter . |
default boolean |
isPlain()
Returns
true if this is a CqnPlain value. |
default boolean |
isRef()
Returns
true if this is a CqnElementRef . |
default Optional<String> |
type()
Returns the optional CDS type of this value.
|
toJson
default Optional<String> type()
default boolean isRef()
true
if this is a CqnElementRef
.true
if this is an element ref, otherwise false
default boolean isExpression()
true
if this is a CqnExpression
.true
if this is an expression, otherwise false
default boolean isFunction()
true
if this is a CqnFunc
.true
if this is a function, otherwise false
default boolean isLiteral()
true
if this is a CqnLiteral
.true
if this is a literal, otherwise false
default boolean isNullValue()
true
if this is a CqnNullValue
.true
if this is a null value, otherwise false
default boolean isParameter()
true
if this is a CqnParameter
.true
if this is a parameter, otherwise false
default boolean isPlain()
true
if this is a CqnPlain
value.true
if this is a plain value, otherwise false
default CqnElementRef asRef()
CqnElementRef
.ClassCastException
- if this value is not an element refdefault CqnExpression asExpression()
CqnExpression
.ClassCastException
- if this value is not an expressiondefault CqnFunc asFunction()
CqnFunc
.ClassCastException
- if this value is not a functiondefault CqnLiteral<?> asLiteral()
CqnLiteral
.ClassCastException
- if this value is not a literaldefault CqnNullValue asNullValue()
CqnNullValue
.ClassCastException
- if this value is not a null valuedefault CqnParameter asParameter()
CqnParameter
.ClassCastException
- if this value is not a parameterdefault CqnPlain asPlain()
CqnPlain
.ClassCastException
- if this value is not a plain valueCopyright © 2020 SAP. All rights reserved.