Package com.sap.cds.reflect
Interface CdsElementDefinition
- All Superinterfaces:
CdsAnnotatable
,CdsNamed
- All Known Subinterfaces:
CdsElement
-
Method Summary
Modifier and TypeMethodDescriptionReturns anOptional
wrapping the default value of this element.Returns the expression that calculates this element.default String
getKey()
Returns the name that uniquely identifies this named objectgetName()
Returns the name of thisCdsElement
.<T extends CdsType>
TgetType()
Returns the type of thisCdsElement
.default boolean
Returnstrue
if thisCdsElement
is calculated.boolean
isKey()
Returnstrue
if thisCdsElement
is a key.boolean
Returnstrue
if thisCdsElement
is localized.boolean
Returnstrue
if thisCdsElement
cannot benull
.boolean
isUnique()
Returnstrue
if thisCdsElement
is unique.boolean
Returnstrue
if thisCdsElement
is virtual.Methods inherited from interface com.sap.cds.reflect.CdsAnnotatable
annotations, findAnnotation, getAnnotationValue, getDoc
-
Method Details
-
getName
String getName()Returns the name of thisCdsElement
.- Returns:
- the namespace of this element, not
null
-
getType
Returns the type of thisCdsElement
.- Type Parameters:
T
- theCdsType
of this element- Returns:
- the type of this element, not
null
-
isKey
boolean isKey()Returnstrue
if thisCdsElement
is a key.- Returns:
true
if this element is a key, otherwisefalse
-
isVirtual
boolean isVirtual()Returnstrue
if thisCdsElement
is virtual.- Returns:
true
if this is a virtual element, otherwisefalse
-
isUnique
boolean isUnique()Returnstrue
if thisCdsElement
is unique.- Returns:
true
if this is a unique element, otherwisefalse
-
isNotNull
boolean isNotNull()Returnstrue
if thisCdsElement
cannot benull
.- Returns:
true
if this element cannot benull
, otherwisefalse
-
isLocalized
boolean isLocalized()Returnstrue
if thisCdsElement
is localized.- Returns:
true
if this element is localized, otherwisefalse
-
defaultValue
Returns anOptional
wrapping the default value of this element.- Returns:
- an
Optional
describing the default value of this element, or an emptyOptional
if there is no default value
-
getKey
Description copied from interface:CdsNamed
Returns the name that uniquely identifies this named object -
getExpression
Returns the expression that calculates this element.- Returns:
- the reference to an
CqnValue
that defines value of the element
-
isCalculated
default boolean isCalculated()Returnstrue
if thisCdsElement
is calculated.- Returns:
true
if this element is calculated, otherwisefalse
-