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

Hierarchy

Implements

  • EntityIdentifiable<EntityT>

Index

Constructors

Properties

Methods

Constructors

constructor

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

    Type parameters

    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

    Returns Field<EntityT>

Properties

Readonly _entity

_entity: EntityT

Readonly _entityConstructor

_entityConstructor: Constructable<EntityT, unknown>

Readonly _fieldName

_fieldName: string

Methods

fieldPath

  • fieldPath(): string
  • Path to the field to be used in filter and order by queries. In most cases this will just be the _fieldName itself. However, for complex types for instance, the path is prefixed with the name of the complextype.

    Returns string

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