@ObjectModel
BETA This annotation is beta and should be reviewed for completion and correctness.
Introduction
The object model captures definitions of structural as well as transactional related aspects of the business data model.
Schema Definitions
- This is an extension vocabulary for CSN Interop Effective Document.
- The interface is available as JSON Schema: object-model.schema.json.
Annotations Overview
Annotation | Scope | Description |
---|---|---|
@ObjectModel.compositionRoot | Entity | Entity is the root of a compositional hierarchy. |
@ObjectModel.representativeKey | Entity, Service | In case of multiple key elements: key element which represents the entity (in the sense that the entity itself is the list of values for this key element) |
@ObjectModel.semanticKey | Entity | The entity contains element(s) which shall be used to display the key in UIs (instead of the technical key). |
@ObjectModel.custom | Type, Entity, Service | Indicates whether the annotated element or entity is a custom element. If set to true, it is a custom element (field, entity, service, etc.). If undefined or set to false, it is not defined whether it is a custom element. If applied to an entity or service, everything that it contains is also considered custom. |
@ObjectModel.modelingPattern | Entity, Service | The property declares the modeling pattern applied in this entity definition. |
@ObjectModel.supportedCapabilities | Entity, Service | The property declares the supported usage type for this entity in the context of consuming data models. |
@ObjectModel.foreignKey.association | Type | The element is of type cds.Association which points to the list of values.Use only for service internal associations. For cross service associations, use the @EntityRelationship Vocabulary instead. |
@ObjectModel.text.element | Type | The property contains element(s) containing a text for the annotated (id)element |
@ObjectModel.text.association | Type | The element is of type cds.association, which points to an entity containing (language-dependent) texts for the annotated (id) element |
@ObjectModel.tenantWideUniqueName | Entity | Unique technical name of the entity within the tenant / isolation context it is deployed to. This may be used as a hint for database table names and help to keep them short enough. Once chosen the technical name ID MUST be kept stable (immutable). |
@ObjectModel.usageType.sizeCategory | Entity | The size category enables the consumer to judge the possible result data set size. It is a pure estimation at design time while modeling the entity what the data set size would be at runtime. It reflects the set of data which has to be searched through to compute for example a count(*) of the data. The labels correspond to the following size categories (expected number of rows at production customers): - S: less than 1000 - M: less than 100.000 - L: less than 10.000.000 - XL: less than 100.000.000 - XXL: more than 100.000.000 |
@ObjectModel.compositionRoot
Entity is the root of a compositional hierarchy.
Scope: Entity
Extending: EntityDefinition
Type: boolean
Default Value: true
@ObjectModel.representativeKey
In case of multiple key elements: key element which represents the entity (in the sense that the entity itself is the list of values for this key element)
Scope: Entity, Service
Extending: EntityDefinition, ServiceDefinition
External Type: Element Reference
@ObjectModel.semanticKey
The entity contains element(s) which shall be used to display the key in UIs (instead of the technical key).
Scope: Entity
Extending: EntityDefinition
Type: Array<Element Reference>
@ObjectModel.custom
Indicates whether the annotated element or entity is a custom element. If set to true, it is a custom element (field, entity, service, etc.). If undefined or set to false, it is not defined whether it is a custom element.
If applied to an entity or service, everything that it contains is also considered custom.
Scope: Type, Entity, Service
Extending: BooleanType, StringType, LargeStringType, IntegerType, Integer64Type, DecimalType, DoubleType, DateType, TimeType, DateTimeType, TimestampType, UUIDType, AssociationType, CompositionType, CustomType, TypeDefinition, BooleanTypeDefinition, StringTypeDefinition, LargeStringTypeDefinition, IntegerTypeDefinition, Integer64TypeDefinition, DecimalTypeDefinition, DoubleTypeDefinition, DateTypeDefinition, TimeTypeDefinition, DateTimeTypeDefinition, TimestampTypeDefinition, UUIDTypeDefinition, AssociationTypeDefinition, CompositionTypeDefinition, EntityDefinition, ServiceDefinition
Type: boolean
@ObjectModel.modelingPattern
The property declares the modeling pattern applied in this entity definition.
Scope: Entity, Service
Extending: EntityDefinition, ServiceDefinition
Type: Object(#)
Property | Type | Description |
---|---|---|
string | Provide the value in { "#": "<value>" } enum notation.Allowed Values:
|
Example Values:
{
"#": "DATA_STRUCTURE"
}
@ObjectModel.supportedCapabilities
The property declares the supported usage type for this entity in the context of consuming data models.
Scope: Entity, Service
Extending: EntityDefinition, ServiceDefinition
Type: Array<Supported Capabilities Enum Value>
@ObjectModel.foreignKey.association
The element is of type cds.Association
which points to the list of values.
Use only for service internal associations. For cross service associations, use the @EntityRelationship Vocabulary instead.
Scope: Type
Extending: BooleanType, StringType, LargeStringType, IntegerType, Integer64Type, DecimalType, DoubleType, DateType, TimeType, DateTimeType, TimestampType, UUIDType, AssociationType, CompositionType, CustomType, TypeDefinition, BooleanTypeDefinition, StringTypeDefinition, LargeStringTypeDefinition, IntegerTypeDefinition, Integer64TypeDefinition, DecimalTypeDefinition, DoubleTypeDefinition, DateTypeDefinition, TimeTypeDefinition, DateTimeTypeDefinition, TimestampTypeDefinition, UUIDTypeDefinition, AssociationTypeDefinition, CompositionTypeDefinition
External Type: Element Reference
@ObjectModel.text.element
The property contains element(s) containing a text for the annotated (id)element
Scope: Type
Extending: BooleanType, StringType, LargeStringType, IntegerType, Integer64Type, DecimalType, DoubleType, DateType, TimeType, DateTimeType, TimestampType, UUIDType, AssociationType, CompositionType, CustomType, TypeDefinition, BooleanTypeDefinition, StringTypeDefinition, LargeStringTypeDefinition, IntegerTypeDefinition, Integer64TypeDefinition, DecimalTypeDefinition, DoubleTypeDefinition, DateTypeDefinition, TimeTypeDefinition, DateTimeTypeDefinition, TimestampTypeDefinition, UUIDTypeDefinition, AssociationTypeDefinition, CompositionTypeDefinition
Type: Array<Element Reference>
Example Values:
[
"BillingDocumentTypeName"
]
@ObjectModel.text.association
The element is of type cds.association, which points to an entity containing (language-dependent) texts for the annotated (id) element
Scope: Type
Extending: BooleanType, StringType, LargeStringType, IntegerType, Integer64Type, DecimalType, DoubleType, DateType, TimeType, DateTimeType, TimestampType, UUIDType, AssociationType, CompositionType, CustomType, TypeDefinition, BooleanTypeDefinition, StringTypeDefinition, LargeStringTypeDefinition, IntegerTypeDefinition, Integer64TypeDefinition, DecimalTypeDefinition, DoubleTypeDefinition, DateTypeDefinition, TimeTypeDefinition, DateTimeTypeDefinition, TimestampTypeDefinition, UUIDTypeDefinition, AssociationTypeDefinition, CompositionTypeDefinition
External Type: Element Reference
@ObjectModel.tenantWideUniqueName
Unique technical name of the entity within the tenant / isolation context it is deployed to. This may be used as a hint for database table names and help to keep them short enough.
Once chosen the technical name ID MUST be kept stable (immutable).
Scope: Entity
Extending: EntityDefinition
Type: string
Maximum Length: 120
@ObjectModel.usageType.sizeCategory
The size category enables the consumer to judge the possible result data set size. It is a pure estimation at design time while modeling the entity what the data set size would be at runtime. It reflects the set of data which has to be searched through to compute for example a count(*) of the data.
The labels correspond to the following size categories (expected number of rows at production customers):
- S: less than 1000
- M: less than 100.000
- L: less than 10.000.000
- XL: less than 100.000.000
- XXL: more than 100.000.000
Scope: Entity
Extending: EntityDefinition
Type: Object(#)
Property | Type | Description |
---|---|---|
string | Provide the value in { "#": "<value>" } enum notation.Allowed Values:
|
Example Values:
{
"#": "XL"
}
Supported Capabilities Enum Value
Type: Object(#)
Property | Type | Description |
---|---|---|
string | The entry declares one supported usage type. Allowed Values:
|