Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Filter<EntityT, FieldT>

Represents a filter expression to narrow the data on a 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: Entity

    Type of the entity to be filtered on

  • FieldT: FieldType

    Type of the field to be filtered by, see also: FieldType

Hierarchy

  • Filter

Implements

  • EntityIdentifiable<EntityT>

Index

Constructors

constructor

  • Creates an instance of Filter.

    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: EdmType

      EdmType of the field to filter on, needed for custom fields

    Returns Filter

Properties

_entityConstructor

_entityConstructor: Constructable<EntityT>

Constructor type of the entity to be filtered.

_fieldName

_fieldName: string | FilterFunction<EntityT, FieldT>
deprecated

Since v1.16.0 Use field instead.

Optional edmType

edmType: EdmType

EdmType of the field to filter on, needed for custom fields

field

field: string | FilterFunction<EntityT, FieldT>

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

operator

operator: FilterOperator

Function to be used for matching

value

value: FieldT

Value to be used by the operator