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

Type Parameters

  • FieldOfT extends ConstructorOrField<any>

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

  • DeSerializersT extends DeSerializers

    Type of the (de-)serializers.

Hierarchy

  • FieldBuilder

Constructors

  • Creates an instance of FieldBuilder.

    Type Parameters

    • FieldOfT extends ConstructorOrField<any, any>

    • DeSerializersT extends DeSerializers<any, any, any, any, any, any, any, any, any, any, any, any, any, any, DeSerializersT>

    Parameters

    • fieldOf: FieldOfT

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

    • deSerializers: DeSerializersT

      (De-)serializers used for transformation.

    Returns FieldBuilder<FieldOfT, DeSerializersT>

Properties

fieldOf: FieldOfT

Methods

  • 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.

    Returns

    A collection field with the given collection type.

    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>, DeSerializersT, CollectionFieldT, NullableT, IsSelectableField<FieldOfT>>

  • Build a field for a property with a complex type. Fields of entities are selectable; fields of complex types are not selectable.

    Returns

    A complex type field of the given type.

    Type Parameters

    Parameters

    Returns ComplexTypeFieldT

  • Build a field for a property with a enum type.

    Returns

    A collection field with the given collection type.

    Type Parameters

    • EnumT extends string

    • NullableT extends 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>, DeSerializersT, EnumT, NullableT, IsSelectableField<FieldOfT>>

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