Home Reference Source
public class | source

FilterExpression

Extends:

TypedObject → FilterExpression

A class that represents an individual filter expression A filter expression consists of a columnName (this is the property of the object to search), an operation type (one of the FILTER_OPERATION_TYPE constants) and an expression (the value to search on).

Static Method Summary

Static Public Methods
public static

convert(filterComparisionType: String, object: Object): *

convert object to other datatype using filterComparisionType parameter

public static

createFilterExpression(filter: *, columnName: *, filterOperation: *, expression: *, wasContains: *): *

Creates a filter expression

public static

It parse "1" or "true" or "yes" or "y" as true and "0" or "false" or "no" or "n" as false otherwise handled by default boolean function

Constructor Summary

Public Constructor
public

constructor(columnName: *, filterOperation: *, expression: *)

Member Summary

Public Members
public

The property of the object to search on

public

The expression to compare against

public

filter: flexiciousNmsp.Filter

public

This is ususally automatically set, you dont have to manually set it, unless you're sending strings as Date objects. When set, will attempt to first convert the current value to the type you specified and then do the conversion.

public

An filterControl that was responsible for the creation of this argument.

public

For some filter controls, the expression is different than the selected value.

public

The filter operation to apply - one of the FILTER_OPERATION_TYPE constant values

public

Applies to Ultimate only.

public

Method Summary

Public Methods
public

clone(): flexiciousNmsp.FilterExpression

public

copyFrom(filterExpression: Object): flexiciousNmsp.FilterExpression

public
public

isMatch(src: *, grid: *): Boolean

Given an object checks to see if it matches the criteria specified by this filter expression

Inherited Summary

From class TypedObject
public

typeCache: {}

public
public

Returns a list of strings that represent the object hierarchy for this object.

public

Returns true if the class name to check is in the list of class names defined for this class.

Static Public Methods

public static convert(filterComparisionType: String, object: Object): * source

convert object to other datatype using filterComparisionType parameter

Params:

NameTypeAttributeDescription
filterComparisionType String
object Object

Return:

*

public static createFilterExpression(filter: *, columnName: *, filterOperation: *, expression: *, wasContains: *): * source

Creates a filter expression

Params:

NameTypeAttributeDescription
filter *

The filter create the expression for

columnName *

The column to search

filterOperation *

The filter operation to apply. See the list of FILTER_OPERATION_TYPE constants

expression *

The expression to compare against

wasContains *

Return:

*

public static parseBoolean(str: String): Boolean source

It parse "1" or "true" or "yes" or "y" as true and "0" or "false" or "no" or "n" as false otherwise handled by default boolean function

Params:

NameTypeAttributeDescription
str String

Return:

Boolean

description

Public Constructors

public constructor(columnName: *, filterOperation: *, expression: *) source

Override:

TypedObject#constructor

Params:

NameTypeAttributeDescription
columnName *
filterOperation *
expression *

Public Members

public columnName: String source

The property of the object to search on

Properties:

NameTypeAttributeDescription
columnName *

public expression: String source

The expression to compare against

Properties:

NameTypeAttributeDescription
expression *

public filter: flexiciousNmsp.Filter source

Properties:

NameTypeAttributeDescription
filter *

public filterComparisionType: String source

This is ususally automatically set, you dont have to manually set it, unless you're sending strings as Date objects. When set, will attempt to first convert the current value to the type you specified and then do the conversion.

Properties:

NameTypeAttributeDescription
filterComparisionType *

public filterControl: * source

An filterControl that was responsible for the creation of this argument. Used in case of IConverterFilterControl, which in addition to being a filter control, also encapsulates the logic of performing the comparisions and actual matching of the filter criteria.

Properties:

NameTypeAttributeDescription
filterControl *

public filterControlValue: * source

For some filter controls, the expression is different than the selected value. We store the actual value of the filter control, so it can be rebuilt.

Properties:

NameTypeAttributeDescription
filterControlValue *

public filterOperation: String source

The filter operation to apply - one of the FILTER_OPERATION_TYPE constant values

Properties:

NameTypeAttributeDescription
filterOperation *

public recurse: boolean source

Applies to Ultimate only. When set to true, will check to see if either the current item, or any of it's children or grandchildren match the criteria. Used in hierarchical searches, when the parent does not match, but one of the children matches so we have to show the parent as well.

Properties:

NameTypeAttributeDescription
recurse *

public wasContains: boolean source

Public Methods

public clone(): flexiciousNmsp.FilterExpression source

Return:

flexiciousNmsp.FilterExpression

return clone of this filter expresssion

public copyFrom(filterExpression: Object): flexiciousNmsp.FilterExpression source

Params:

NameTypeAttributeDescription
filterExpression Object

Return:

flexiciousNmsp.FilterExpression

public getClassNames(): string[] source

Returns a list of strings that represent the object hierarchy for this object.

Override:

TypedObject#getClassNames

Return:

string[]

public isMatch(src: *, grid: *): Boolean source

Given an object checks to see if it matches the criteria specified by this filter expression

Params:

NameTypeAttributeDescription
src *
grid *

Return:

Boolean

Throw:

Error

Invalid expression for Filter expression