SAP Cloud SDK for JavaScript - v4.1.1
    Preparing search index...

    Class EnumField<EntityT, DeSerializersT, EnumT, NullableT, SelectableT>

    Represents a property with an enum value.

    Type Parameters

    • EntityT extends EntityBase

      Type of the entity the field belongs to.

    • DeSerializersT extends DeSerializers
    • EnumT extends string = string

      Enum type that contains all valid enum entries for this field.

    • NullableT extends boolean = false

      Boolean type that represents whether the field is nullable.

    • SelectableT extends boolean = false

      Boolean type that represents whether the field is selectable.

    Hierarchy (View Summary)

    Index

    Constructors

    • Creates an instance of EnumField.

      Type Parameters

      • EntityT extends EntityBase
      • DeSerializersT extends DeSerializers<
            any,
            any,
            any,
            any,
            any,
            any,
            any,
            any,
            any,
            any,
            any,
            any,
            any,
            any,
        >
      • EnumT extends string = string
      • NullableT extends boolean = false
      • SelectableT extends boolean = false

      Parameters

      • fieldName: string

        Actual name of the field used in the OData request.

      • _fieldOf: ConstructorOrField<EntityT>

        The constructor of the entity or the complex type field this field belongs to.

      • OptionalenumType: Record<string, EnumT>

        Enum type of the field according to the metadata description.

      • OptionalfieldOptions: FieldOptions<NullableT, SelectableT>

        Optional settings for this field.

      Returns EnumField<EntityT, DeSerializersT, EnumT, NullableT, SelectableT>

    Properties

    _entityConstructor: Constructable<EntityT>
    _fieldName: string
    _fieldOptions: Required<FieldOptions<NullableT, SelectableT>>
    enumType?: Record<string, EnumT>

    Methods

    • Creates an instance of Filter for this field and the given value using the operator 'eq', i.e. ==.

      Parameters

      • value: `${EnumT}`

        Value to be used in the filter.

      Returns Filter<EntityT, DeSerializersT, string>

      The resulting filter.

    • Gets the path to the complex type property represented by this.

      Returns string

      The path to the complex type property.

    • Creates an instance of Filter for this field and the given value using the operator 'ne', i.e. !=.

      Parameters

      • value: `${EnumT}`

        Value to be used in the filter.

      Returns Filter<EntityT, DeSerializersT, string>

      The resulting filter.

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