Interface: AttributeFilter

Oracle® JavaScript Extension Toolkit (JET)
9.2.0

F30740-01

Signature:

interface AttributeFilter<D> extends AttributeFilterDef<D>, BaseDataFilter<D>

QuickNav

Fields

AttributeFilter

Version:
  • 9.2.0
Since:
  • 7.0.0
Module:
  • ojdataprovider

Module usage

See JET Module Loading for an overview of module usage within JET.

Typescript Import Format
//To use this interface, import as below.
import {AttributeFilter} from "ojs/ojdataprovider";
Generic Parameters
ParameterDescription
DType of Data

JET In Typescript

A detailed description of working with JET elements and classes in your typescript project can be found at: JET Typescript Usage.

Description

Defines a kind of DataFilter.Filter which applies to the attributes in item data.

Fields

op :AttributeFilterDef.AttributeOperator

Operator to apply for the filter.
Since:
  • 7.0.0
Inherited From:

value :any

Specifies the value to filter for. Value should be an object which specifies attribute/value pairs to filter on. The op will be applied to each attribute/value pair and the whole will be AND'd. For subobjects, please specify them in a nested structure.
Since:
  • 7.0.0
Inherited From:
Examples

Filter definition which filters on DepartmentId value 10

{op: '$eq', value: {DepartmentId: 10}}

Filter definition which filters on DepartmentId value 10 and DepartmentName is Hello

{op: '$eq', value: {DepartmentId: 10, DepartmentName: 'Hello'}}

Filter definition which filters on subobject Location State is California and DepartmentName is Hello

{op: '$eq', value: {DepartmentName: 'Hello', Location: {State: 'California'}}}

Methods

filter(item: D, index?: number, array?: Array<D>): boolean;

Specifies a filter function which has the same signature as the the callback which is specified for the JS Array.filter(): https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter This function will be optionally used by the DataProvider to do local filtering. This function is required by the DataProvider so that it is possible for DataProvider implementations to at least do local filtering.
Parameters:
Name Type Argument Description
item any The current element being processed in the array.
index number <optional>
The index of the current element being processed in the array.
array Array <optional>
The array filter was called upon.
Since:
  • 8.0.0
Inherited From:
Returns:
True if the element satisfies the filter.
Type
boolean