Package com.sap.cds.reflect
Interface CdsElement
- All Superinterfaces:
CdsAnnotatable
,CdsNamed
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
accept
(CdsVisitor visitor) Accepts aCdsVisitor
visiting this type.Returns anOptional
wrapping the default value of this element.<T extends CdsDefinition>
TReturns the declaring type of thisCdsElement
.Returns the expression that calculates this element.default String
getKey()
Returns the name that uniquely identifies this named objectgetName()
Returns the name of thisCdsElement
.default String
Returns the fully qualified name of this element.<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
-
Method Details
-
getName
String getName()Returns the name of thisCdsElement
.- Returns:
- the namespace of this element, not
null
-
getQualifiedName
Returns the fully qualified name of this element.- Returns:
- the fully qualified name
-
getType
Returns the type of thisCdsElement
.- Type Parameters:
T
- theCdsType
of this element- Returns:
- the type of this element, not
null
-
getDeclaringType
Returns the declaring type of thisCdsElement
.- Type Parameters:
T
- the type of the declaring type- Returns:
- the declaring 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
-
accept
Accepts aCdsVisitor
visiting this type.- Parameters:
visitor
- theCdsVisitor
-
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
-