public interface CdsStructuredType extends CdsType
Modifier and Type | Method and Description |
---|---|
default void |
accept(CdsVisitor visitor)
Accepts a
CdsVisitor visiting the elements of this definition
(depth-first) |
default Stream<CdsElement> |
associations()
Returns a sequential
Stream over the CdsElement(s)
of type CdsAssociationType in this structured type. |
default Stream<CdsElement> |
compositions()
Returns a sequential
Stream over the CdsElement(s)
of type composition in this structured type. |
default Stream<CdsElement> |
concreteElements()
Returns a sequential
Stream over the non virtual CdsElement(s) in this structured type. |
default Stream<CdsElement> |
concreteNonAssociationElements()
Returns a sequential
Stream over the CdsElement(s)
in this structured type that are not of type CdsAssociationType and
not virtual. |
Stream<CdsElement> |
elements()
Returns a sequential
Stream over all CdsElement(s)
in this structured type. |
default <T extends CdsType> |
elementsOfType(Class<T> type)
|
Optional<CdsElement> |
findAssociation(String name)
|
Optional<CdsElement> |
findElement(String name)
Returns an
Optional wrapping a CdsElement . |
CdsElement |
getAssociation(String name)
Get a
CdsElement of type CdsAssociationType by name. |
CdsElement |
getElement(String name)
Get a
CdsElement by name. |
default CdsEntity |
getTargetOf(String association)
Returns the target
CdsEntity of the association element with the
given name. |
default boolean |
isAnonymous()
Returns
true if this is an inline defined structured type without a
name. |
default boolean |
isInlineDefined()
Deprecated.
instead use
isAnonymous() |
default boolean |
isStructured()
Returns
true if this is a structured type. |
default Stream<CdsElement> |
keyElements()
Returns a sequential
Stream over the key CdsElement(s) in this structured type. |
default Stream<CdsElement> |
nonAssociationElements()
Returns a sequential
Stream over the CdsElement(s)
in this structured type that are not of type CdsAssociationType . |
default Stream<CdsElement> |
virtualElements()
Returns a sequential
Stream over the virtual CdsElement(s) in this structured type. |
isArrayed, isAssociation, isEnum, isSimple, isSimpleType
as, byNamespace, getKind, getName, getQualifiedName, getQualifier
annotations, byAnnotation, findAnnotation, getAnnotationValue
CdsElement getElement(String name)
CdsElement
by name.name
- the name of the CdsElement
CdsElement
with the given nameCdsElementNotFoundException
- if there is no CdsElement
with
the given nameOptional<CdsElement> findElement(String name)
Optional
wrapping a CdsElement
.name
- the name of the CdsElement
Optional
describing the CdsElement
with the given
name, or an empty Optional
if there is no CdsElement
with this nameCdsElement getAssociation(String name)
CdsElement
of type CdsAssociationType
by name.name
- the name of the CdsElement
CdsElement
of type CdsAssociation
with the given
nameCdsElementNotFoundException
- if there is no CdsElement
with
the given nameOptional<CdsElement> findAssociation(String name)
name
- the name of the CdsElement
Optional
describing the CdsElement
of type
CdsAssociation
with the given name, or an empty
Optional
if there is no CdsElement
with this namedefault CdsEntity getTargetOf(String association)
CdsEntity
of the association element with the
given name.association
- the name of the association elementCdsEntity
of the CdsAssociation
CdsElementNotFoundException
- if there is no association with the given
nameStream<CdsElement> elements()
Stream
over all CdsElement(s)
in this structured type.Stream
over the CdsElement(s)
default Stream<CdsElement> keyElements()
Stream
over the key CdsElement(s)
in this structured type.Stream
over the key CdsElement(s)
default Stream<CdsElement> virtualElements()
Stream
over the virtual CdsElement(s)
in this structured type.Stream
over the virtual CdsElement(s)
default Stream<CdsElement> concreteElements()
Stream
over the non virtual CdsElement(s)
in this structured type.Stream
over the non virtual
CdsElement(s)
default Stream<CdsElement> nonAssociationElements()
Stream
over the CdsElement(s)
in this structured type that are not of type CdsAssociationType
.Stream
over the CdsElement(s)
that are
not of type CdsAssociation
default Stream<CdsElement> concreteNonAssociationElements()
Stream
over the CdsElement(s)
in this structured type that are not of type CdsAssociationType
and
not virtual.Stream
over the CdsElement(s)
that are
not of type CdsAssociation
default Stream<CdsElement> associations()
Stream
over the CdsElement(s)
of type CdsAssociationType
in this structured type.Stream
over the CdsElement(s)
of type
CdsAssociation
default Stream<CdsElement> compositions()
Stream
over the CdsElement(s)
of type composition in this structured type.Stream
over the CdsElement(s)
of type
compositiondefault <T extends CdsType> Stream<CdsElement> elementsOfType(Class<T> type)
T
- the type of the CdsElement(s)
type
- the type class of the CdsElement(s)
Stream
over the CdsElement(s)
of the
given type <T>
@Deprecated default boolean isInlineDefined()
isAnonymous()
default boolean isAnonymous()
true
if this is an inline defined structured type without a
name.true
if this is a structured type without name, otherwise
false
default boolean isStructured()
CdsType
true
if this is a structured type.isStructured
in interface CdsType
true
if this is a structured type, otherwise false
default void accept(CdsVisitor visitor)
CdsDefinition
CdsVisitor
visiting the elements of this definition
(depth-first)accept
in interface CdsDefinition
visitor
- the CdsVisitor
Copyright © 2021 SAP. All rights reserved.