Package com.sap.cds.reflect
Interface CdsEntity
-
- All Superinterfaces:
CdsAnnotatable
,CdsDefinition
,CdsNamed
,CdsStructuredType
,CdsType
public interface CdsEntity extends CdsStructuredType
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
accept(CdsVisitor visitor)
Accepts aCdsVisitor
visiting the elements of this definition (depth-first)Stream<CdsAction>
actions()
Optional<CdsAction>
findAction(String name)
Optional<CdsFunction>
findFunction(String name)
Returns anOptional
wrapping a boundedCdsFunction
.Stream<CdsFunction>
functions()
CdsAction
getAction(String name)
Get a boundedCdsAction
via its name.CdsFunction
getFunction(String name)
Get aCdsFunction
via its name.default CdsKind
getKind()
Returns the kind of this definition.boolean
isAbstract()
Returnstrue
if this entity is abstract.boolean
isProjection()
Returnstrue
if this entity is a projection.boolean
isView()
Returnstrue
if this entity is a view.Stream<CdsParameter>
params()
Optional<CqnSelect>
query()
Returns the query of thisCdsEntity
.-
Methods inherited from interface com.sap.cds.reflect.CdsAnnotatable
annotations, findAnnotation, getAnnotationValue
-
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, isInlineDefined, isStructured, keyElements, nonAssociationElements, virtualElements
-
Methods inherited from interface com.sap.cds.reflect.CdsType
isArrayed, isAssociation, isEnum, isSimple, isSimpleType
-
-
-
-
Method Detail
-
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
Optional<CqnSelect> query()
Returns the query of thisCdsEntity
.- Returns:
- an
Optional
describing the query, or an emptyOptional
if there is no query - See Also:
CqnSelect
-
params
Stream<CdsParameter> params()
- Returns:
- a sequential
Stream
over theCdsParameter(s)
-
getAction
CdsAction getAction(String name)
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
Optional<CdsAction> findAction(String name)
- 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
CdsFunction getFunction(String name)
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
Optional<CdsFunction> findFunction(String name)
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
default CdsKind getKind()
Description copied from interface:CdsDefinition
Returns the kind of this definition.- Specified by:
getKind
in interfaceCdsDefinition
- Returns:
- the kind of this definition
-
accept
default void accept(CdsVisitor visitor)
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
-
-