Represents a filter expression to narrow the data on a GetAllRequestBuilder request for multiple entities that match the specified criteria. A filter refers to the field of an entity and restricts the request based on an operator and a value. Entity.FIELD_NAME.operator(value).

Example

Product.NAME.equals('cloud-sdk') creates a filter for the entity Product that matches in case the field NAME equals 'cloud-sdk'.

See also: Filterable.

Type Parameters

  • EntityT extends EntityBase

    Type of the entity to be filtered on.

  • DeSerializersT extends DeSerializers

  • FieldT

    Type of the field to be filtered by.

Hierarchy

  • Filter

Implements

Constructors

  • Creates an instance of Filter.

    Type Parameters

    • EntityT extends EntityBase<EntityT>

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

    • FieldT

    Parameters

    • field: string | FilterFunction<EntityT, FieldT>

      Name of the field of the entity to be filtered on or a filter function.

    • operator: FilterOperator

      Function to be used for matching.

    • value: FieldT

      Value to be used by the operator.

    • Optional edmType: EdmTypeShared<ODataVersionOf<EntityT>>

      EDM type of the field to filter on, needed for custom fields.

    Returns Filter<EntityT, DeSerializersT, FieldT>

Properties

_deSerializers: DeSerializersT

Dummy property to include also the deserializer type in the strucutre of the entity type.

_entity: EntityT

Entity type of the entity tp be filtered.

edmType?: EdmTypeShared<ODataVersionOf<EntityT>>
field: string | FilterFunction<EntityT, FieldT>
operator: FilterOperator
value: FieldT

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