Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Filters

Simple Filter DSL.

remarks

The methods in this class are simple factory methods for various Filter classes. The use of these methods is strongly encouraged in lieu of direct construction of Filter classes as it makes the code more readable.

Hierarchy

  • Filters

Index

Methods

Static all

  • Return a composite filter representing logical AND of all specified filters.

    Parameters

    • Rest ...filters: Filter[]

      a variable number of filters

    Returns Filter

    a composite filter representing logical AND of all specified filters

Static always

  • Return a filter that always evaluates to true.

    link

    AlwaysFilter

    Returns Filter

    a filter that always evaluates to true.

Static any

  • Return a composite filter representing logical OR of all specified filters.

    see

    AnyFilter

    Parameters

    • Rest ...filters: Filter[]

      an array of filters.

    Returns Filter

    a composite filter representing logical OR of all specified filters

Static arrayContains

  • Return a filter that tests if the extracted array contains the specified value.

    Type parameters

    • E

    Parameters

    • extractorOrMethod: ValueExtractor | string

      the extractor.ValueExtractor used by this filter or the name of the method to invoke via reflection

    • value: E

      the object that a Collection or Object array is tested to contain

    Returns Filter

    a filter that tests if the extracted array contains the specified value

Static arrayContainsAll

  • Return a filter that tests if the extracted array contains all of the specified values.

    Parameters

    • extractorOrMethod: ValueExtractor | string

      the extractor.ValueExtractor used by this filter or the name of the method to invoke via reflection

    • values: Set<any>

      the object that a Collection or Object array is tested to contain

    Returns Filter

    a filter that tests if the extracted array contains the specified values

Static arrayContainsAny

  • Return a filter that tests if the extracted array contains any of the specified values.

    Parameters

    • extractorOrMethod: ValueExtractor | string

      the extractor.ValueExtractor used by this filter or the name of the method to invoke via reflection

    • values: Set<any>

      the object that a Collection or Object array is tested to contain

    Returns Filter

    a filter that tests if the extracted array contains the specified values

Static between

  • between(extractorOrMethod: ValueExtractor | string, from: number, to: number, includeLowerBound?: boolean, includeUpperBound?: boolean): Filter
  • Return a filter that tests if the extracted value is between the specified values (inclusive).

    Parameters

    • extractorOrMethod: ValueExtractor | string

      the extractor.ValueExtractor used by this filter or the name of the method to invoke via reflection

    • from: number

      the lower bound to compare the extracted value with

    • to: number

      the upper bound to compare the extracted value with

    • Default value includeLowerBound: boolean = true

      a flag indicating whether values matching the lower bound evaluate to true

    • Default value includeUpperBound: boolean = true

      a flag indicating whether values matching the upper bound evaluate to true

    Returns Filter

    a filter that tests if the extracted value is between the specified values

Static contains

  • Return a filter that tests if the extracted collection contains the specified value.

    Type parameters

    • E

    Parameters

    • extractorOrMethod: ValueExtractor | string

      the extractor.ValueExtractor used by this filter or the name of the method to invoke via reflection

    • value: E

      the object that a Collection or Object array is tested to contain

    Returns ContainsFilter

    a filter that tests if the extracted collection contains the specified value

Static containsAll

  • Return a filter that tests if the extracted collection contains all of the specified values.

    Parameters

    • extractorOrMethod: ValueExtractor | string

      the extractor.ValueExtractor used by this filter or the name of the method to invoke via reflection

    • values: Set<any>

      the object that a Collection or Object array is tested to contain

    Returns Filter

    a filter that tests if the extracted collection contains all of the specified values.

Static containsAny

  • Return a filter that tests if the extracted collection contains any of the specified values.

    Parameters

    • extractorOrMethod: ValueExtractor | string

      the extractor.ValueExtractor used by this filter or the name of the method to invoke via reflection

    • values: Set<any>

      the object that a Collection or Object array is tested to contain

    Returns Filter

    a filter that tests if the extracted collection contains any of the specified values.

Static equal

  • Return a filter that tests for equality against the extracted value.

    Type parameters

    • E = any

    Parameters

    • extractorOrMethod: ValueExtractor | string

      the extractor.ValueExtractor used by this filter or the name of the method to invoke via reflection

    • value: E

      the value to compare the extracted value with

    Returns EqualsFilter

    a filter that tests for equality

Static event

  • Return a MapEventFilter using the provided filter and MapEventFilter mask.

    Type parameters

    • K = any

    • V = any

    Parameters

    • ff: Filter

      the event filter

    • Default value mask: number = filter.MapEventFilter.KEYSET

      the event mask

    Returns MapEventFilter<K, V>

Static greater

  • Return a filter that tests if the extracted value is greater than the specified value.

    Type parameters

    • E = any

    Parameters

    • extractorOrMethod: ValueExtractor | string

      the extractor.ValueExtractor used by this filter or the name of the method to invoke via reflection

    • value: E

      the value to compare the extracted value with

    Returns GreaterFilter

    a filter that tests if the extracted value is greater than the specified value.

Static greaterEqual

  • Return a filter that tests if the extracted value is greater than or equal to the specified value.

    Type parameters

    • E = any

    Parameters

    • extractorOrMethod: ValueExtractor | string

      the extractor.ValueExtractor used by this filter or the name of the method to invoke via reflection

    • value: E

      the value to compare the extracted value with

    Returns GreaterFilter

    a filter that tests if the extracted value is greater than or equal to the specified value.

Static in

  • Return a filter that tests if the extracted value is contained in the specified array.

    see

    ContainsAnyFilter

    Type parameters

    • E = any

    Parameters

    • extractorOrMethod: ValueExtractor | string

      the extractor.ValueExtractor used by this filter or the name of the method to invoke via reflection

    • values: Set<E>

      the values to compare the extracted value with

    Returns Filter

    a filter that tests if the extracted value is contained in the specified array.

Static isNotNull

  • Return a filter that evaluates to true for non-null values.

    Parameters

    Returns IsNotNullFilter

    a filter that evaluates to true for non-null values.

Static isNull

  • Return a filter that evaluates to true for null values.

    Parameters

    Returns IsNotNullFilter

    a filter that evaluates to true for null values.

Static less

  • Return a filter that tests if the extracted value is less than the specified value.

    Type parameters

    • E = any

    Parameters

    • extractorOrMethod: ValueExtractor | string

      the extractor.ValueExtractor used by this filter or the name of the method to invoke via reflection

    • value: E

      the value to compare the extracted value with

    Returns LessFilter

    a filter that tests if the extracted value is less than the specified value

Static lessEqual

  • Return a filter that tests if the extracted value is less than or equal to the specified value.

    Type parameters

    • E = any

    Parameters

    • extractorOrMethod: ValueExtractor | string

      the extractor.ValueExtractor used by this filter or the name of the method to invoke via reflection

    • value: E

      the value to compare the extracted value with

    Returns Filter

    a filter that tests if the extracted value is less than or equal to the specified value

Static like

  • like(extractorOrMethod: ValueExtractor | string, pattern: string, escape: string, ignoreCase: boolean): Filter
  • Return a LikeFilter for pattern match.

    Parameters

    • extractorOrMethod: ValueExtractor | string

      the extractor.ValueExtractor used by this filter or the name of the method to invoke via reflection

    • pattern: string

      the string pattern to compare the result with

    • escape: string

      the escape character for escaping '%' and '_'

    • ignoreCase: boolean

      true to be case-insensitive

    Returns Filter

    a LikeFilter

Static never

  • Return a filter that always evaluates to false.

    Returns Filter

    a filter that always evaluates to false.

Static not

  • Return a filter that represents the logical negation of the specified filter.

    Parameters

    Returns Filter

    a filter that represents the logical negation of the specified filter.

Static notEqual

  • Return a filter that tests for non-equality.

    Type parameters

    • E

    Parameters

    • extractorOrMethod: ValueExtractor | string

      the extractor.ValueExtractor used by this filter or the name of the method to invoke via reflection

    • value: E

      the value to compare the extracted value with

    Returns Filter

    a filter that tests for non-equality

Static present

  • Return a filter that evaluates to true if an entry is present in the cache.

    see

    PresentFilter

    Returns Filter

    a filter that evaluates to true if an entry is present

Static regex

  • Return a RegexFilter for pattern match.

    Parameters

    • extractorOrMethod: ValueExtractor | string

      the extractor.ValueExtractor used by this filter or the name of the method to invoke via reflection

    • regex: string

      the Java regular expression to match the result with

    Returns Filter