Classes


Class actuate.data.Filter

Specifies filter conditions to be used by other classes when processing data. A filter has three components: a column, an operator, and a value or set of values. The condition is expressed as "value1 operator value2". For some operators, like #.IN, the expression will be "value1 IN value2" where value2 is an array of strings.

Format numbers and date/time values in a locale neutral format, for example "2.5" or "09/31/2008 01:02:03 AM".
Member of: actuate.data.

Class Summary
Constructor Attributes Constructor Name and Description
 
actuate.data.Filter(columnName, operator, value1, value2)
Constructs a filter object.
Field Summary
Field Attributes Field Name and Description
<static> <constant>  
Filter operator for "between".
<static> <constant>  
Filter operator for "bottom N".
<static> <constant>  
Filter operator for "bottom percent".
<static> <constant>  
EQ
Filter operator for "equals" Expression: "value1 = value2"
<static> <constant>  
Filter operator for "is false".
<static> <constant>  
Filter operator for "greater than" Expression: "value1 > value2"
<static> <constant>  
Filter operator for "greater than or equal" Expression: "value1 >= value2"
<static> <constant>  
IN
Filter operator for "in".
<static> <constant>  
Filter operator for "less than" Expression: "value1 < value2"
<static> <constant>  
Filter operator for "less than or equal" Expression: "value1 <= value2"
<static> <constant>  
Filter operator for "is like".
<static> <constant>  
Filter operator for "match".
<static> <constant>  
Filter operator for "between".
<static> <constant>  
Filter operator for "not equals" Expression: "value1 != value2" (value1 is different from value2) Needs two values.
<static> <constant>  
Filter operator for "not in".
<static> <constant>  
Filter operator for "not like".
<static> <constant>  
Filter operator for "not match".
<static> <constant>  
Filter operator for "is not null".
<static> <constant>  
Filter operator for "is null".
<static> <constant>  
Filter operator for "top N".
<static> <constant>  
Filter operator for "top percent".
<static> <constant>  
Filter operator for "is true".
Method Summary
Method Attributes Method Name and Description
 
Returns the column name.
 
Returns the operator.
 
Returns the evaluated results of this filter.
 
setColumnName(columnName)
Sets the name of the column to filter.
 
setOperator(operator)
Sets filter operator.
 
setValues(value1, value2)
Sets string values for the filter to compare to the data in the column according to the operator.
Class Detail
actuate.data.Filter(columnName, operator, value1, value2)
Constructs a filter object. To select all of the rows matching a list of countries in their country fields, use code similar to the following:
	var filter = new actuate.data.Filter("COUNTRY", actuate.data.Filter.IN,["Canada" , "USA", "UK", "Australia"]);
To create a filter to display only entries with a CITY value of NYC, use the following code:
	var cityfilter = new actuate.data.Filter("CITY", actuate.data.Filter.EQ, "NYC");
Parameters:
{String} columnName
The column name.
{String} operator
The operator can be any operator. The field summary lists the valid filter operators. No additional parameters are required for the #.FALSE, #.NOT_NULL, #.NULL, and #.TRUE operators.
{String[ ]} value1
The first value or values to compare. This is the first value compared to the column value for the #.BETWEEN or #.NOT_BETWEEN operators.
{String[ ]} value2
The second value or values to compare. This parameter is only required for the #.BETWEEN or #.NOT_BETWEEN operators.
Field Detail
<static> <constant> BETWEEN
Filter operator for "between". Expression: "value1 between value2[0] and value2[1]" where value2 is an array of strings.

<static> <constant> BOTTOM_N
Filter operator for "bottom N". Expression: "bottom n of value1"

<static> <constant> BOTTOM_PERCENT
Filter operator for "bottom percent". Expression: "bottom percent of value1"

<static> <constant> EQ
Filter operator for "equals" Expression: "value1 = value2"

<static> <constant> FALSE
Filter operator for "is false". Expression: "value1 is false"

<static> <constant> GREATER_THAN
Filter operator for "greater than" Expression: "value1 > value2"

<static> <constant> GREATER_THAN_OR_EQUAL
Filter operator for "greater than or equal" Expression: "value1 >= value2"

<static> <constant> IN
Filter operator for "in". Expression: "value1 in value2" where value2 is an array of strings.

<static> <constant> LESS_THAN
Filter operator for "less than" Expression: "value1 < value2"

<static> <constant> LESS_THAN_OR_EQUAL
Filter operator for "less than or equal" Expression: "value1 <= value2"

<static> <constant> LIKE
Filter operator for "is like". Expression: "value1 like value2"

<static> <constant> MATCH
Filter operator for "match". Expression: "value1 matches value2"

<static> <constant> NOT_BETWEEN
Filter operator for "between". Expression: "value1 not between value2[0] and value2[1]" where value2 is an array of strings.

<static> <constant> NOT_EQ
Filter operator for "not equals" Expression: "value1 != value2" (value1 is different from value2) Needs two values.

<static> <constant> NOT_IN
Filter operator for "not in". Expression: "value1 not in value2" where value2 is an array of strings.

<static> <constant> NOT_LIKE
Filter operator for "not like". Expression: "value1 not like value2"

<static> <constant> NOT_MATCH
Filter operator for "not match". Expression: "value1 doesn't match value2"

<static> <constant> NOT_NULL
Filter operator for "is not null". Expression: "value1 is not null"

<static> <constant> NULL
Filter operator for "is null". Expression: "value1 is null"

<static> <constant> TOP_N
Filter operator for "top N". Expression: "top n of value1"

<static> <constant> TOP_PERCENT
Filter operator for "top percent". Expression: "top percent of value1"

<static> <constant> TRUE
Filter operator for "is true". Expression: "value1 is true"
Method Detail
{String} getColumnName()
Returns the column name. This example retrieves the name of the column:
	function retrieveColumnName(myFilter){
		var colname = myFilter.getColumnName( );
		return colname;
	}
Returns:
{String} The name of the column.

{String} getOperator()
Returns the operator. This example retrieves the name of the filter operator:
	function retrieveFilterOperator(myFilter){
		var myOp = myFilter.getOperator( );
		return myOp;
	}
Returns:
{String} The field summary lists the valid filter operators.

{String[ ]} getValues()
Returns the evaluated results of this filter. When the filter is constructed or set with a single argument, the returned value corresponds to the single argument. When two arguments or an array are set in the filter, the return value is an array of values. This example retrieves the name of the filter operator:
	function retrieveValues(myFilter){
		var myVals = myFilter.getValues( );
		return myVals;
	}
Returns:
{String[ ]} String or array of strings. Returns the value or values from the filter..

{void} setColumnName(columnName)
Sets the name of the column to filter. This example sets the name of the column to filter to Sales:
	function setFilterSales( myfilter ){
		myfilter.setColumnName("Sales");
	}
Parameters:
{String} columnName
The column name.
Returns:
{void}

{void} setOperator(operator)
Sets filter operator. The operator determines the comparison made between the data in the column and the value or values set in the filter. This example sets the filter to retrieve the bottom five values:
	function setFilterBot5( ){
		myfilter.setOperator("BOTTOM_N");
		myfilter.setValues("5");
	}
Parameters:
{String} operator
The operator can be any operator. The field summary lists the valid filter operators.
Returns:
{void}

{void} setValues(value1, value2)
Sets string values for the filter to compare to the data in the column according to the operator. Takes either one or two values, or one array of values. This example sets the filter to retrieve values between 10 and 35:
	function setFilter( myfilter ){
		myfilter.setOperator("BETWEEN");
		myfilter.setValues("10","35");
	}
Parameters:
{String[ ]} value1
The value or values to compare to the column value.
{String} value2
Optional. The second value to compare to the column value.
Returns:
{void}

Documentation generated by JsDoc Toolkit 2.0.1 on Tue Jan 29 2013 05:44:21 GMT-0800 (PST)