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

  • Field<EntityT, NullableT, SelectableT>
    • EnumField

Constructors

  • Creates an instance of EnumField.

    Type Parameters

    • EntityT extends EntityBase<EntityT>

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

    • 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, any>

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

    • Optional enumType: Record<string, EnumT>

      Enum type of the field according to the metadata description.

    • Optional fieldOptions: FieldOptions<NullableT, SelectableT>

      Optional settings for this field.

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

Properties

_entityConstructor: Constructable<EntityT>
_fieldName: string
_fieldOf: ConstructorOrField<EntityT, any>
_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. ==.

    Returns

    The resulting filter.

    Parameters

    • value: `${EnumT}`

      Value to be used in the filter.

    Returns Filter<EntityT, DeSerializersT, string>

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

    Returns

    The path to the complex type property.

    Returns string

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

    Returns

    The resulting filter.

    Parameters

    • value: `${EnumT}`

      Value to be used in the filter.

    Returns Filter<EntityT, DeSerializersT, string>

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