The Search criteria object
The search criteria object is used by AssemblyLines and Connectors to
specify a generic search criteria. It is up to each Connector how to interpret
and translate the search criteria into a Connector specific search. The search
criteria is a very simple multi value object where each value specify an
attribute, operand and a value.
Methods
Function |
Description |
size () |
Number of criteria specifications |
getCriteria ( int ) |
Returns a criteria object at position int. The
returned criteria object contains three fields: name, match and value. The
possible values for the match operand are listed below. |
getFirstCriteriaName |
Returns the attribute name for the first
criteria |
getFirstCriteriaValue |
Returns the value for the first criteria |
getFirstCriteriaMatch |
Returns the matching operator for the first
criteria |
Operands
The following operands have been defined for use with the criteria objects.
Character |
Meaning |
= |
EQUALS |
~ |
CONTAINS |
^ |
STARTS WITH |
$ |
ENDS WITH |
! |
NOT EQUALS |
Example
for ( i = 0; i < search.size(); i++ ) {
var sc = search.getCriteria ( i );
task.logmsg ( sc.name + sc.match + sc.value );
}
|