Package com.sap.cds.reflect.overlay
Interface CdsAssociationExtender
@Beta
public interface CdsAssociationExtender
The
CdsAssociationExtender
allows to define and extend the underlying
CdsElement
of type CdsAssociationType
.-
Method Summary
Modifier and TypeMethodDescriptionaddAnnotation
(String key, Object value) Adds an annotation to the element.and()
Returns to theCdsEntityExtender
that created thisCdsAssociationExtender
.on
(CqnPredicate onCondition) Sets the on-condition for the association.Sets a to-many cardinality for the association to the given target entity.Sets a to-one cardinality for the association to the given target entity.
-
Method Details
-
toOne
Sets a to-one cardinality for the association to the given target entity.- Parameters:
qualifiedName
- the qualified name of the target entity- Returns:
- this
CdsAssociationExtender
-
toMany
Sets a to-many cardinality for the association to the given target entity.- Parameters:
qualifiedName
- the qualified name of the target entity- Returns:
- this
CdsAssociationExtender
-
on
Sets the on-condition for the association.- Parameters:
onCondition
- the on-condition- Returns:
- this
CdsAssociationExtender
-
addAnnotation
Adds an annotation to the element.- Parameters:
key
- the annotation keyvalue
- the annotation value- Returns:
- this
CdsAssociationExtender
-
and
CdsEntityExtender and()Returns to theCdsEntityExtender
that created thisCdsAssociationExtender
.- Returns:
- the parent
CdsEntityExtender
to continue extending the entity
-