FilterInterface Object

add

adds a new filtering rule to collection.

<!--- some_field LIKE "%abc%" --->
<cfset filter.add("name","value")> 
<!--- some_field < 5 --->
<cfset filter.add("name","value","comp_oper")>

Parameters:

  • name - name of the field.
  • value - comporison value (filtering criteria).
  • comp_oper - comparison operator: '>' or '<'.

clear

clears collection (deletes all specified filtering rules).

<cfset filter.clear()>

Parameters:

  • none.

index

check if there are some rules in collection for the specified field and returns related hash.

<cfset index=filter.index("some_field")>

Parameters:

  • name - name of the field Returns:

  • true - if collection contains rule(s) for the specified field.

  • false - if collection doesn't contain any rules for the field.

rules

array of all specified sorting rules.

<cfset name = filter.rules[1]["name"]>
<cfset filter.rules[1]["value"]="cde">

Properties:

  • name - name of related field.
  • value - comporison value (filtering criteria).
  • operation - comporison operator. If empty - default LIKE instruction is used.
Back to top