Class: FilterFactory

Oracle® JavaScript Extension Toolkit (JET)
9.0.0

F24343-01

Signature:

class FilterFactory<D>

QuickNav

FilterFactory

Version:
  • 9.0.0
Since:
  • 7.0.0
Module:
  • ojdataprovider

Module usage

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

Javascript Import Format
define(['ojs/ojdataprovider'], function(dataprovider) {
 // Application should call API on dataprovider.FilterFactory 
})
Typescript Import Format
//To import this class, use the format below.
import {FilterFactory} from "ojs/ojdataprovider";

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

Provides the ability to construct filters which can be used for FetchListParameters#filterCriterion. Note is it not a requirement to use this factory to construct filters based on the filter definition. Applications can construct their own filters which implement the interface DataFilter.Filter

Methods

(static) getFilter(options: {filterDef: DataFilter.FilterDef<any>, filterOptions: any}): DataFilter.Filter<any>

This function is used to pass in a filter definition and returns a filter which can be used with DataProviders. It essentially takes the filter definition and then adds a local filter() function which is required when used for a DataProvider filterCriterion.
Parameters:
Name Type Description
options Object Options for the getFilter() function
Properties
Name Type Argument Description
filterDef DataFilter.FilterDef The filter definition for the filter to be returned.
filterOptions any <optional>
Options for the filter such as textFilterAttributes which lists the attributes to filter on for TextFilter.
Since:
  • 7.0.0
Returns:
Returns either an AttributeFilter, AttributeExprFilter, CompoundFilter, or TextFilter depending on whether a AttributeFilterDef or CompoundFilterDef. was passed in.
Type
DataFilter.Filter