Options
All
  • Public
  • Public/Protected
  • All
Menu

Abstract representation a property of an OData entity.

Fields are used as static properties of entities or properties of ComplexTypeFields and are generated from the metadata, i.e. for each property of an OData entity, there exists one static instance of Field (or rather one of its subclasses) in the corresponding generated class file. Fields are used to represent the domain of values that can be used in select, filter and order by functions.

See also: Selectable, EdmTypeField, ComplexTypeField

Type parameters

  • EntityT: EntityBase

    Type of the entity the field belongs to.

  • NullableT: boolean = false

    Boolean type that represents whether the field is nullable.

  • SelectableT: boolean = false

    Boolean type that represents whether the field is selectable.

Hierarchy

Implements

  • EntityIdentifiable<EntityT>

Index

Constructors

  • new Field<EntityT, NullableT, SelectableT>(_fieldName: string, _entityConstructor: Constructable<EntityT, unknown>, fieldOptions?: FieldOptions<NullableT, SelectableT>): Field<EntityT, NullableT, SelectableT>
  • Creates an instance of Field.

    Type parameters

    • EntityT: EntityBase<EntityT>

    • NullableT: boolean = false

    • SelectableT: boolean = false

    Parameters

    • _fieldName: string

      Actual name of the field used in the OData request

    • _entityConstructor: Constructable<EntityT, unknown>

      Constructor type of the entity the field belongs to

    • Optional fieldOptions: FieldOptions<NullableT, SelectableT>

      Optional settings for this field.

    Returns Field<EntityT, NullableT, SelectableT>

Properties

_entity: EntityT
_entityConstructor: Constructable<EntityT, unknown>
_fieldName: string
_fieldOptions: Required<FieldOptions<NullableT, SelectableT>>

Methods

  • fieldPath(): string
  • Path to the field to be used in filter and order by queries.

    Returns string

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

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