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 extends EntityBase

    Type of the entity the field belongs to.

  • NullableT extends boolean = false

    Boolean type that represents whether the field is nullable.

  • SelectableT extends boolean = false

    Boolean type that represents whether the field is selectable.

Hierarchy

Constructors

  • Creates an instance of Field.

    Type Parameters

    • EntityT extends EntityBase<EntityT>

    • NullableT extends boolean = false

    • SelectableT extends boolean = false

    Parameters

    • _fieldName: string

      Actual name of the field used in the OData request.

    • _entityConstructor: Constructable<EntityT>

      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

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

Methods

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

    Returns

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

    Returns string

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