Class EdmTypeField<EntityT, DeSerializersT, EdmT, NullableT, SelectableT>

Represents a property of an OData entity with an EDM type.

EdmTypeFields are used as static properties of entities or EDM typed fields of complex type fields. They are generated from the OData metadata, i.e. for each property of an OData entity, that has an EDM type, there is one static instance of EdmTypeField (or rather one of its subclasses) in the corresponding generated class file. EdmTypeFields are used to represent the domain of more or less primitive values that can be used in select, filter and order by functions. For example, when constructing a query on the BusinessPartner entity, an instance of EdmTypeField<BusinessPartner, string> can be supplied as argument to the select function, e.g. BusinessPartner.FIRST_NAME.

See also: Selectable.

Type Parameters

  • EntityT extends EntityBase

    Type of the entity the field belongs to.

  • DeSerializersT extends DeSerializers

    Type of the (de-)serializers.

  • EdmT extends EdmTypeShared<"any">

    EDM type of the 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

Implements

Constructors

  • Creates an instance of EdmTypeField.

    Type Parameters

    Parameters

    • fieldName: string

      Actual name of the field used in the OData request.

    • _fieldOf: ConstructorOrField<EntityT, any>

      Constructor type of the entity the field belongs to.

    • edmType: EdmT

      Type of the field according to the metadata description.

    • _deSerializers: DeSerializersT

      (De-)serializers used for transformation.

    • Optional fieldOptions: FieldOptions<NullableT, SelectableT>

      Optional settings for this field.

    Returns EdmTypeField<EntityT, DeSerializersT, EdmT, NullableT, SelectableT>

Properties

_deSerializers: DeSerializersT

Dummy property to include also the deserializer type in the strucutre of the entity type.

_entity: EntityT

Dummy property whose type makes structurally identical entities distiguishable in TypeScript.

_entityConstructor: Constructable<EntityT>
_fieldName: string
_fieldOf: ConstructorOrField<EntityT, any>
_fieldOptions: Required<FieldOptions<NullableT, SelectableT>>
edmType: EdmT

Methods

  • Path to the field to be used in filter and order by queries.

    Returns

    Path to the field to be used in filter and order by queries.

    Returns string

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