Options
All
  • Public
  • Public/Protected
  • All
Menu

Represents a complex type property of an entity.

ComplexTypeFields are used as static properties of 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: EntityBase

    Type of the entity the field belongs to

  • ComplexT = any

Hierarchy

  • Field<EntityT>
    • ComplexTypeField

Index

Constructors

constructor

  • new ComplexTypeField<EntityT, ComplexT>(fieldName: string, fieldOf: ConstructorOrField<EntityT, ComplexT>, complexType?: ComplexTypeNamespace<ComplexT>): ComplexTypeField<EntityT, ComplexT>
  • new ComplexTypeField<EntityT, ComplexT>(fieldName: string, entityConstructor: Constructable<EntityT, unknown>, complexTypeName: string): ComplexTypeField<EntityT, ComplexT>
  • Creates an instance of ComplexTypeField.

    Type parameters

    Parameters

    • fieldName: string

      Actual name of the field as used in the OData request.

    • fieldOf: ConstructorOrField<EntityT, ComplexT>

      Either the parent entity constructor of the parent complex type this field belongs to.

    • Optional complexType: ComplexTypeNamespace<ComplexT>

      The complex type of the complex type property represented by this.

    Returns ComplexTypeField<EntityT, ComplexT>

  • deprecated

    Since v1.19.0.

    Creates an instance of ComplexTypeField.

    Type parameters

    Parameters

    • fieldName: string

      Actual name of the field as used in the OData request.

    • entityConstructor: Constructable<EntityT, unknown>

      Constructor type of the entity the field belongs to.

    • complexTypeName: string

      Name of the type of the field according to the metadata description.

    Returns ComplexTypeField<EntityT, ComplexT>

Properties

Readonly _complexType

_complexType: ComplexTypeNamespace<ComplexT>

The complex type of the complex type property represented by this.

Readonly _entity

_entity: EntityT

Readonly _entityConstructor

_entityConstructor: Constructable<EntityT, unknown>

Readonly _fieldName

_fieldName: string

Readonly fieldOf

fieldOf: ConstructorOrField<EntityT, ComplexT>

Methods

fieldPath

  • fieldPath(): string
  • Gets the path to the complex type property represented by this.

    Returns string

    The path to the complex type property.