Options
All
  • Public
  • Public/Protected
  • All
Menu

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

EdmTypeFields are used as static properties of entities and are generated from the metadata, i.e. for each property of an OData entity, that has an Edm type, there exists 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: EntityBase

    Type of the entity the field belongs to

  • FieldT: FieldType

    Type of the field

Hierarchy

Index

Constructors

constructor

  • new EdmTypeField<EntityT, FieldT>(fieldName: string, entityConstructor: Constructable<EntityT, unknown>, edmType: EdmTypeShared<VersionT>): EdmTypeField<EntityT, FieldT>
  • Creates an instance of EdmTypeField.

    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

    • edmType: EdmTypeShared<VersionT>

      Type of the field according to the metadata description

    Returns EdmTypeField<EntityT, FieldT>

Properties

Readonly _entity

_entity: EntityT

Readonly _entityConstructor

_entityConstructor: Constructable<EntityT, unknown>

Readonly _fieldName

_fieldName: string

Readonly edmType

edmType: EdmTypeShared<VersionT>

Methods

equals

  • equals(value: FieldT): Filter<EntityT, FieldT>
  • Creates an instance of Filter for this field and the given value using the operator 'eq', i.e. ==.

    Parameters

    • value: FieldT

      Value to be used in the filter

    Returns Filter<EntityT, FieldT>

    The resulting filter

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.

notEquals

  • notEquals(value: FieldT): Filter<EntityT, FieldT>
  • Creates an instance of Filter for this field and the given value using the operator 'ne', i.e. !=.

    Parameters

    • value: FieldT

      Value to be used in the filter

    Returns Filter<EntityT, FieldT>

    The resulting filter