Options
All
  • Public
  • Public/Protected
  • All
Menu

Class EdmTypeField<EntityT, FieldT>

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

EdmTypeFields are used as static properties of VDM 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: Entity

    Type of the entity the field belongs to

  • FieldT: FieldType

    Type of the field

Hierarchy

Implements

  • EntityIdentifiable<EntityT>

Index

Constructors

constructor

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

    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

    • edmType: EdmType

      Type of the field according to the metadata description

    Returns EdmTypeField

Properties

edmType

edmType: EdmType

Type of the field according to the metadata description

entityConstructor

entityConstructor: Constructable<EntityT>

Constructor type of the entity the field belongs to

fieldName

fieldName: string

Actual name of the field used in the OData request

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