Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ComplexTypeField<EntityT>

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

ComplexTypeFields 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 a complex type, there exists one static instance of ComplexTypeField (or rather one of its subclasses) in the corresponding generated class file. ComplexTypeFields are used to represent the domain of complex or custom structures that can be used in select, filter and order by functions. For example, when constructing a query on the TimeSheetEntry entity, an instance of ComplexTypeField<TimeSheetEntry> can be supplied as argument to the select function, e.g. TimeSheetEntry.TIME_SHEET_DATA_FIELDS. Moreover, classes implementing this abstract class will provide property fields, that can be used for filtering and ordering.

See also: Selectable

Type parameters

  • EntityT: Entity

    Type of the entity the field belongs to

Hierarchy

  • Field<EntityT>
    • ComplexTypeField

Implements

  • EntityIdentifiable<EntityT>

Index

Constructors

constructor

  • new ComplexTypeField(fieldName: string, entityConstructor: Constructable<EntityT>, complexTypeName: string): ComplexTypeField
  • Creates an instance of ComplexTypeField.

    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

    • complexTypeName: string

      Type of the field according to the metadata description

    Returns ComplexTypeField

Properties

complexTypeName

complexTypeName: string

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

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.