Class ComplexTypeField<EntityT, DeSerializersT, ComplexT, NullableT, SelectableT>Abstract

Represents a complex type property of an entity or a complex type.

ComplexTypeFields are used as static properties of entities and are generated from the metadata, i.e. for each property of an OData entity, that has a complex type, there exists one static instance of ComplexTypeField (or rather one of its subclasses) in the corresponding generated class file. ComplexTypeFields are used to represent the domain of complex or custom structures that can be used in select, filter and order by functions. For example, when constructing a query on the TimeSheetEntry entity, an instance of ComplexTypeField<TimeSheetEntry> can be supplied as argument to the select function, e.g. TimeSheetEntry.TIME_SHEET_DATA_FIELDS. Moreover, classes implementing this abstract class will provide property fields, that can be used for filtering and ordering.

See also: Selectable.

Type Parameters

  • EntityT extends EntityBase

    Type of the entity the field belongs to.

  • DeSerializersT extends DeSerializers

    Type of the (de-)serializers.

  • ComplexT = any

    Type of complex type represented by this field.

  • NullableT extends boolean = false

    Boolean type that represents whether the field is nullable.

  • SelectableT extends boolean = false

    Boolean type that represents whether the field is selectable.

Hierarchy (View Summary)

Constructors

Properties

_entityConstructor: Constructable<EntityT>
_fieldName: string
_fieldOptions: Required<FieldOptions<NullableT, SelectableT>>
complexTypeName?: string

Note that this property is crucial, although not really used. If it is removed this class becomes structural equivalent to e.g. ComplexTypeStringPropertyField which leads to unexpected behavior on the selectable list of objects.

deSerializers: DeSerializersT

Methods

  • Gets the path to the complex type property represented by this.

    Returns string

    The path to the complex type property.

    Copyright Ⓒ 2024 SAP SE or an SAP affiliate company. All rights reserved.