Package com.sap.cds.reflect.overlay
Interface CdsElementExtender
@Beta
public interface CdsElementExtender
The
CdsElementExtender allows to define and extend the underlying
CdsElement.-
Method Summary
Modifier and TypeMethodDescriptionaddAnnotation(String key, Object value) Adds an annotation to the element.and()Returns to theCdsEntityExtenderthat created thisCdsElementExtender.type(CdsBaseType baseType) Sets the type for the element.type(CdsBaseType baseType, Map<String, Object> properties) Sets the type for the element.
-
Method Details
-
type
Sets the type for the element.- Parameters:
baseType- the base type- Returns:
- this
CdsElementExtender - Throws:
IllegalStateException- if the element is typed already
-
type
Sets the type for the element.- Parameters:
baseType- the base typeproperties- base type properties- Returns:
- this
CdsElementExtender - Throws:
IllegalStateException- if the element is typed already
-
addAnnotation
Adds an annotation to the element.- Parameters:
key- the annotation keyvalue- the annotation value- Returns:
- this
CdsElementExtender
-
and
CdsEntityExtender and()Returns to theCdsEntityExtenderthat created thisCdsElementExtender.- Returns:
- the parent
CdsEntityExtenderto continue extending the entity
-