Options
All
  • Public
  • Public/Protected
  • All
Menu

Class EdmTypeField<EntityT, EdmOrFieldT, 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: EntityBase

    Type of the entity the field belongs to

  • EdmOrFieldT: EdmTypeShared<"any"> | FieldType

    EDM type of the field. Deprecated: Field type of the field.

  • 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

Index

Constructors

  • Creates an instance of EdmTypeField.

    Type parameters

    • EntityT: EntityBase<EntityT>

    • EdmOrFieldT: undefined | null | string | number | boolean | Moment | Time | Duration | BigNumber

    • NullableT: boolean = false

    • SelectableT: boolean = false

    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: EdmTypeForEdmOrFieldType<EdmOrFieldT>

      Type of the field according to the metadata description.

    • Optional fieldOptions: FieldOptions<NullableT, SelectableT>

      Optional settings for this field.

    Returns EdmTypeField<EntityT, EdmOrFieldT, NullableT, SelectableT>

Properties

_entity: EntityT
_entityConstructor: Constructable<EntityT, unknown>
_fieldName: string
_fieldOf: ConstructorOrField<EntityT, any>
_fieldOptions: Required<FieldOptions<NullableT, SelectableT>>
edmType: EdmTypeForEdmOrFieldType<EdmOrFieldT>

Methods

  • Creates an instance of Filter for this field and the given value using the operator 'eq', i.e. ==.

    Parameters

    Returns Filter<EntityT, NullableFieldType<EdmOrFieldT extends EdmTypeCommon | ExclusiveEdmTypeV2 | ExclusiveEdmTypeV4 ? NonNullableFieldTypeByEdmType<EdmOrFieldT> : EdmOrFieldT, NullableT>>

    The resulting filter

  • 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.

  • Creates an instance of Filter for this field and the given value using the operator 'ne', i.e. !=.

    Parameters

    Returns Filter<EntityT, NullableFieldType<EdmOrFieldT extends EdmTypeCommon | ExclusiveEdmTypeV2 | ExclusiveEdmTypeV4 ? NonNullableFieldTypeByEdmType<EdmOrFieldT> : EdmOrFieldT, NullableT>>

    The resulting filter

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