Package com.sap.cds.reflect
Interface CdsAssociationType
- All Superinterfaces:
CdsAnnotatable,CdsDefinition,CdsNamed,CdsType
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptiondefault voidaccept(CdsVisitor visitor) Accepts aCdsVisitorvisiting the elements of this definition (depth-first)Returns theCdsAssociationType.Cardinalityof thisCdsAssociation.default StringReturns the fully qualified name of this definition.Returns the targetCdsEntityof thisCdsAssociation.default booleanReturnstrueif this is an association type.booleanReturnstrueif this is a composition.booleanReturnstrueif this is an enclosed association, which is declared via a filtered composition.Returns anOptionalwrapping the on condition of this association.refs()Returns a sequentialStreamofelement refsthat are used to identify thetarget entityof this association.Methods inherited from interface com.sap.cds.reflect.CdsAnnotatable
annotations, findAnnotation, getAnnotationValue, getDocMethods inherited from interface com.sap.cds.reflect.CdsDefinition
as, getKey, getKind, getName, getQualifierMethods inherited from interface com.sap.cds.reflect.CdsType
isArrayed, isEnum, isSimple, isSimpleType, isStructured, isSymbolicType
-
Method Details
-
getTarget
CdsEntity getTarget()Returns the targetCdsEntityof thisCdsAssociation.- Returns:
- the target
CdsEntityof this association, notnull
-
getTargetAspect
Optional<CdsStructuredType> getTargetAspect()Returns anOptionalwrapping the target Aspect'sCdsTypeprovided this is a composition that targets an aspect.- Returns:
Optionalholding the target aspect'sCdsTypeif this is a composition of aspects, or an emptyOptionalotherwise
-
getCardinality
CdsAssociationType.Cardinality getCardinality()Returns theCdsAssociationType.Cardinalityof thisCdsAssociation.- Returns:
- the
Cardinalityof this association, notnull
-
isComposition
boolean isComposition()Returnstrueif this is a composition.- Returns:
trueif this is a composition, otherwisefalse
-
isEnclosed
boolean isEnclosed()Returnstrueif this is an enclosed association, which is declared via a filtered composition.- Returns:
trueif this is an enclosed association, otherwisefalse
-
refs
Stream<CqnElementRef> refs()Returns a sequentialStreamofelement refsthat are used to identify thetarget entityof this association. This is only supported for managed to-one associations.- Returns:
- a
Streamof the referenced target entity elements, or an empty stream for unmanaged and to-many associations.
-
onCondition
Optional<CqnPredicate> onCondition()Returns anOptionalwrapping the on condition of this association.- Returns:
- an
Optionaldescribing the on condition of this association, or an emptyOptionalif this association has no on condition - See Also:
-
isAssociation
default boolean isAssociation()Description copied from interface:CdsTypeReturnstrueif this is an association type.- Specified by:
isAssociationin interfaceCdsType- Returns:
trueif this is an association type, otherwisefalse
-
getQualifiedName
Description copied from interface:CdsDefinitionReturns the fully qualified name of this definition.- Specified by:
getQualifiedNamein interfaceCdsDefinition- Returns:
- the fully qualified name of this definition
-
accept
Description copied from interface:CdsDefinitionAccepts aCdsVisitorvisiting the elements of this definition (depth-first)- Specified by:
acceptin interfaceCdsDefinition- Parameters:
visitor- theCdsVisitor
-