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. |
as, isArrayed, isAssociation, isEnum, isSimple, isSimpleTypebyNamespace, getName, getQualifiedName, getQualifierannotations, byAnnotation, findAnnotationCdsElement getElement(String name)
CdsElement by name.name - the name of the CdsElementCdsElement 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 CdsElementOptional 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 CdsElementCdsElement 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 CdsElementOptional 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 CdsAssociationCdsElementNotFoundException - 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 CdsAssociationdefault 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 CdsAssociationdefault Stream<CdsElement> associations()
Stream over the CdsElement(s)
of type CdsAssociationType in this structured type.Stream over the CdsElement(s) of type
CdsAssociationdefault 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
falsedefault boolean isStructured()
CdsTypetrue if this is a structured type.isStructured in interface CdsTypetrue if this is a structured type, otherwise falsedefault void accept(CdsVisitor visitor)
CdsDefinitionCdsVisitor visiting the elements of this definition
(depth-first)accept in interface CdsDefinitionvisitor - the CdsVisitorCopyright © 2020 SAP. All rights reserved.