Provides the
module:caplin/grid/filter/FilterExpression
interface and two implementations
module:caplin/grid/filter/FieldFilterExpression
and
module:caplin/grid/filter/LogicalFilterExpression
.
These filter expressions are used to create the rules that define how the Container Filtering Module configured within the Transformer will determine which records in a particular RTTP container match the specified the criteria and should be returned, and which do not.
Example of FieldFilterExpression
:
var oFilter = new caplin.grid.filter.FieldFilterExpression("Bid", caplin.grid.filter.FieldFilterExpression.Operator.GREATER_THAN, "100");
Example of LogicalFilterExpression
:
var oFilter = new caplin.grid.filter.LogicalFilterExpression(caplin.grid.filter.LogicalFilterExpression.Operator.AND); oFilter.addFilterExpression(new caplin.grid.filter.FieldFilterExpression("Bid", caplin.grid.filter.FieldFilterExpression.Operator.GREATER_THAN, "100")); oFilter.addFilterExpression(new caplin.grid.filter.FieldFilterExpression("Bid", caplin.grid.filter.FieldFilterExpression.Operator.LESS_THAN, "102"));
Example of compound LogicalFilterExpression
:
var oFilter = new caplin.grid.filter.LogicalFilterExpression(caplin.grid.filter.LogicalFilterExpression.Operator.OR); var oSubFilter1 = new caplin.grid.filter.LogicalFilterExpression(caplin.grid.filter.LogicalFilterExpression.Operator.AND); oSubFilter1.addFilterExpression(new caplin.grid.filter.FieldFilterExpression("Bid", caplin.grid.filter.FieldFilterExpression.Operator.GREATER_THAN, "100")); oSubFilter1.addFilterExpression(new caplin.grid.filter.FieldFilterExpression("Bid", caplin.grid.filter.FieldFilterExpression.Operator.LESS_THAN, "102")); var oSubFilter2 = new caplin.grid.filter.LogicalFilterExpression(caplin.grid.filter.LogicalFilterExpression.Operator.AND); oSubFilter2.addFilterExpression(new caplin.grid.filter.FieldFilterExpression("BidYield", caplin.grid.filter.FieldFilterExpression.Operator.GREATER_THAN, "5.5")); oSubFilter2.addFilterExpression(new caplin.grid.filter.FieldFilterExpression("BidYield", caplin.grid.filter.FieldFilterExpression.Operator.LESS_THAN, "8.5")); oFilter.addFilterExpression(oSubFilter1); oFilter.addFilterExpression(oSubFilter2);