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

constructor

  • 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

Readonly _entity

_entity: EntityT

Readonly _entityConstructor

_entityConstructor: Constructable<EntityT, unknown>

Readonly _fieldName

_fieldName: string

Readonly _fieldOptions

_fieldOptions: Required<FieldOptions<NullableT, SelectableT>>

Methods

fieldPath

  • 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 Ⓒ 2021 SAP SE or an SAP affiliate company. All rights reserved.