Options
All
  • Public
  • Public/Protected
  • All
Menu

Class LikeFilter

Filter which compares the result of a method invocation with a value for pattern match. A pattern can include regular characters and wildcard characters _ and %.

During pattern matching, regular characters must exactly match the characters in an evaluated string. Wildcard character _ (underscore) can be matched with any single character, and wildcard character % can be matched with any string fragment of zero or more characters.

Hierarchy

Index

Constructors

constructor

  • new LikeFilter(extractorOrMethod: ValueExtractor | string, pattern: string, escapeChar?: string, ignoreCase?: boolean): LikeFilter
  • Construct a LikeFilter for pattern match.

    Parameters

    • extractorOrMethod: ValueExtractor | string

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

    • pattern: string

      the string pattern to compare the result with

    • Default value escapeChar: string = "0"

      the escape character for escaping % and _

    • Default value ignoreCase: boolean = false

      true to be case-insensitive

    Returns LikeFilter

Properties

@class

@class: string

Server-side Filter implementation type identifier.

escapeChar

escapeChar: string

Protected extractor

extractor: ValueExtractor

The extractor.ValueExtractor used by this Filter.

ignoreCase

ignoreCase: boolean

Protected value

value: string

The value to compare to.

Methods

and

  • Return a composed filter that represents a short-circuiting logical AND of this filter and another. When evaluating the composed filter, if this filter is `false, then the other filter is not evaluated.

    Any exceptions thrown during evaluation of either filter are relayed to the caller; if evaluation of this filter throws an exception, the *other* filter will not be evaluated.

    Parameters

    • other: Filter

      a filter that will be logically-ANDed with this filter

    Returns Filter

    a composed filter that represents the short-circuiting logical AND of this filter and the other filter

associatedWith

  • Return a key associated filter based on this filter and a specified key.

    Type parameters

    • K = any

    Parameters

    • key: K

      associated key

    Returns KeyAssociatedFilter

    a key associated filter

forKeys

  • Return a filter that will only be evaluated within specified key set.

    Type parameters

    • K = any

    Parameters

    • keys: Set<K>

      the set of keys to limit the filter evaluation to

    Returns InKeySetFilter<K>

    a key set-limited filter

or

  • Return a composed predicate that represents a short-circuiting logical OR of this predicate and another. When evaluating the composed predicate, if this predicate is true, then the other predicate is not evaluated.

    Any exceptions thrown during evaluation of either predicate are relayed to the caller; if evaluation of this predicate throws an exception, the *other* predicate will not be evaluated.

    Parameters

    • other: Filter

      a predicate that will be logically-ORed with this predicate

    Returns Filter

    a composed predicate that represents the short-circuiting logical OR of this predicate and the other predicate

xor

  • Return a composed predicate that represents a logical XOR of this predicate and another.

    Any exceptions thrown during evaluation of either predicate are relayed to the caller; if evaluation of this predicate throws an exception, the other predicate will not be evaluated.

    Parameters

    • other: Filter

      a predicate that will be logically-XORed with this predicate

    Returns Filter

    a composed predicate that represents the logical XOR of this predicate and the 'other' predicate