Options
All
  • Public
  • Public/Protected
  • All
Menu

Field builder to orchestrate the creation of the different kinds of fields.

Type parameters

  • FieldOfT: ConstructorOrField<any>

    Type of the entity or complex type field this field belongs to.

Hierarchy

  • FieldBuilder

Index

Constructors

constructor

  • new FieldBuilder<FieldOfT>(fieldOf: FieldOfT): FieldBuilder<FieldOfT>
  • Creates an instance of FieldBuilder.

    Type parameters

    Parameters

    • fieldOf: FieldOfT

      Entity or complex type field, for which the field builder shall create fields.

    Returns FieldBuilder<FieldOfT>

Properties

fieldOf

fieldOf: FieldOfT

Methods

buildCollectionField

  • buildCollectionField<CollectionFieldT, NullableT>(fieldName: string, collectionFieldType: CollectionFieldType<CollectionFieldT>, isNullable: NullableT): CollectionField<EntityTypeFromFieldOf<FieldOfT>, CollectionFieldT, NullableT, IsSelectableField<FieldOfT>>
  • Build a field for a property with a collection type. The type of the field can either be an EDM type or a complex type. Fields of entities are selectable; fields of complex types are not selectable.

    Type parameters

    Parameters

    • fieldName: string

      Name of the field.

    • collectionFieldType: CollectionFieldType<CollectionFieldT>

      Type of the collection. Can either be an EDM type or complex type (not complex type field).

    • isNullable: NullableT

      Whether the field is nullable.

    Returns CollectionField<EntityTypeFromFieldOf<FieldOfT>, CollectionFieldT, NullableT, IsSelectableField<FieldOfT>>

    A collection field with the given collection type.

buildComplexTypeField

  • buildComplexTypeField<ComplexTypeFieldT, ComplexT, NullableT>(fieldName: string, complexTypeFieldCtor: ComplexTypeFieldConstructor<ComplexTypeFieldT, EntityTypeFromFieldOf<FieldOfT>, ComplexT, NullableT, IsSelectableField<FieldOfT>>, isNullable: NullableT): ComplexTypeFieldT
  • Build a field for a property with a complex type. Fields of entities are selectable; fields of complex types are not selectable.

    Type parameters

    Parameters

    • fieldName: string

      Name of the field.

    • complexTypeFieldCtor: ComplexTypeFieldConstructor<ComplexTypeFieldT, EntityTypeFromFieldOf<FieldOfT>, ComplexT, NullableT, IsSelectableField<FieldOfT>>

      Constructor of the complex type field.

    • isNullable: NullableT

      Whether the field is nullable.

    Returns ComplexTypeFieldT

    A complex type field of the given type.

buildEdmTypeField

  • buildEdmTypeField<EdmT, NullableT>(fieldName: string, edmType: EdmT, isNullable: NullableT): OrderableEdmTypeField<EntityTypeFromFieldOf<FieldOfT>, EdmT, NullableT, IsSelectableField<FieldOfT>>
  • buildEdmTypeField<EdmT, NullableT>(fieldName: string, edmType: EdmT, isNullable: NullableT): EdmTypeField<EntityTypeFromFieldOf<FieldOfT>, EdmT, NullableT, IsSelectableField<FieldOfT>>
  • Type parameters

    Parameters

    • fieldName: string
    • edmType: EdmT
    • isNullable: NullableT

    Returns OrderableEdmTypeField<EntityTypeFromFieldOf<FieldOfT>, EdmT, NullableT, IsSelectableField<FieldOfT>>

  • Type parameters

    • EdmT: "Edm.String" | "Edm.Boolean" | "Edm.Guid" | "Edm.Binary" | "Edm.Any" | "Edm.Enum"

    • NullableT: boolean

    Parameters

    • fieldName: string
    • edmType: EdmT
    • isNullable: NullableT

    Returns EdmTypeField<EntityTypeFromFieldOf<FieldOfT>, EdmT, NullableT, IsSelectableField<FieldOfT>>

buildEnumField

  • buildEnumField<EnumT, NullableT>(fieldName: string, enumType: Record<string, EnumT>, isNullable: NullableT): EnumField<EntityTypeFromFieldOf<FieldOfT>, EnumT, NullableT, IsSelectableField<FieldOfT>>
  • Build a field for a property with a enum type.

    Type parameters

    • EnumT: string

    • NullableT: boolean

    Parameters

    • fieldName: string

      Name of the field.

    • enumType: Record<string, EnumT>

      Enum type of this field.

    • isNullable: NullableT

      Whether the field is nullable.

    Returns EnumField<EntityTypeFromFieldOf<FieldOfT>, EnumT, NullableT, IsSelectableField<FieldOfT>>

    A collection field with the given collection type.

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