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

    • fieldName: string

      Name of the field of the entity to be filtered on

    • operator: FilterOperator

      Function to be used for matching

    • value: FieldT

      Value to be used by the operator

    Returns Filter

Properties

andFilters

andFilters: Array<Filterable<EntityT>>

entityConstructor

entityConstructor: Constructable<EntityT>

Constructor type of the entity to be filtered.

fieldName

fieldName: string

Name of the field of the entity to be filtered on

operator

operator: FilterOperator

Function to be used for matching

orFilters

orFilters: Array<Filterable<EntityT>>

value

value: FieldT

Value to be used by the operator