Package com.sap.cds.reflect
Interface CdsEntity
- All Superinterfaces:
CdsAnnotatable
,CdsDefinition
,CdsNamed
,CdsStructuredType
,CdsType
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
accept
(CdsVisitor visitor) Accepts aCdsVisitor
visiting the elements of this definition (depth-first)actions()
findAction
(String name) findFunction
(String name) Returns anOptional
wrapping a boundedCdsFunction
.Get a boundedCdsAction
via its name.getFunction
(String name) Get aCdsFunction
via its name.default CdsKind
getKind()
Returns the kind of this definition.boolean
Returnstrue
if this entity is abstract.boolean
Returnstrue
if this entity is a projection.boolean
isView()
Returnstrue
if this entity is a view.params()
query()
Returns the query of thisCdsEntity
.Methods inherited from interface com.sap.cds.reflect.CdsAnnotatable
annotations, findAnnotation, getAnnotationValue, getDoc
Methods inherited from interface com.sap.cds.reflect.CdsDefinition
as, getKey, getName, getQualifiedName, getQualifier
Methods inherited from interface com.sap.cds.reflect.CdsStructuredType
associations, compositions, concreteElements, concreteNonAssociationElements, elements, elementsOfType, findAssociation, findElement, getAssociation, getElement, getTargetOf, isAnonymous, isStructured, keyElements, nonAssociationElements, virtualElements
Methods inherited from interface com.sap.cds.reflect.CdsType
isArrayed, isAssociation, isEnum, isSimple, isSimpleType, isSymbolicType
-
Method Details
-
isAbstract
boolean isAbstract()Returnstrue
if this entity is abstract.- Returns:
true
if this entity is abstract, otherwisefalse
-
isView
boolean isView()Returnstrue
if this entity is a view.- Returns:
true
if this entity is a view, otherwisefalse
-
isProjection
boolean isProjection()Returnstrue
if this entity is a projection.- Returns:
true
if this entity is a projection, otherwisefalse
-
query
Returns the query of thisCdsEntity
.- Returns:
- an
Optional
describing the query, or an emptyOptional
if there is no query - See Also:
-
params
Stream<CdsParameter> params()- Returns:
- a sequential
Stream
over theCdsParameter(s)
-
actions
- Returns:
- a sequential
Stream
over theCdsAction(s)
-
getAction
Get a boundedCdsAction
via its name.- Parameters:
name
- the name of theCdsAction
- Returns:
- the
CdsAction
with the given name - Throws:
CdsOperationNotFoundException
- if there is noCdsAction
with the given name
-
findAction
- Parameters:
name
- the name of theCdsAction
- Returns:
- an
Optional
describing theCdsAction
with the given name, or an emptyOptional
if there is noCdsAction
with this name
-
functions
Stream<CdsFunction> functions()- Returns:
- a sequential
Stream
over theCdsFunction(s)
-
getFunction
Get aCdsFunction
via its name.- Parameters:
name
- the name of theCdsFunction
- Returns:
- the
CdsFunction
with the given name - Throws:
CdsOperationNotFoundException
- if there is noCdsFunction
with the given name
-
findFunction
Returns anOptional
wrapping a boundedCdsFunction
.- Parameters:
name
- the name of theCdsFunction
- Returns:
- an
Optional
describing theCdsFunction
with the given name, or an emptyOptional
if there is noCdsFunction
with this name
-
getKind
Description copied from interface:CdsDefinition
Returns the kind of this definition.- Specified by:
getKind
in interfaceCdsDefinition
- Returns:
- the kind of this definition
-
accept
Description copied from interface:CdsDefinition
Accepts aCdsVisitor
visiting the elements of this definition (depth-first)- Specified by:
accept
in interfaceCdsDefinition
- Specified by:
accept
in interfaceCdsStructuredType
- Parameters:
visitor
- theCdsVisitor
-