Class
caplin.grid.filter

LogicalFilterExpression

Implementation of FilterExpression that represents how a collection of FilterExpressions should be evaluated together to determine whether a particular record matches their expectation.

The LogicalFilterExpression can either be configured to perform a logical AND or a logical OR. If a logical AND is performed then all of the expressions in the collection must be true for a record to be returned. If a logical OR is performed then at least one of the expressions in the collection must be true.

The #addFilterExpression method will add a FilterExpression to the collection that will be evaluated by this LogicalFilterExpression.

Constructor Summary

Attributes Name and Description
caplin.grid.filter.LogicalFilterExpression(caplin.grid.filter.LogicalFilterExpression.Operator oLogicalOperator)

Constructs a new LogicalFilterExpression with the specified operator.

Method Summary

Attributes Name and Description
void addFilterExpression(caplin.grid.filter.FilterExpression oFilterExpression)

Adds the specified FilterExpression to this LogicalFilterExpression.

<static> caplin.grid.filter.LogicalFilterExpression clone(caplin.grid.filter.FilterExpression oFilterExpression)

Clones a LogicalFilterExpression

caplin.grid.filter.LogicalFilterExpression clone()

Clones this instance of the LogicalFilterExpression

Array getFilterExpressions()

Returns a list of the filter expressions added using #addFilterExpression.

Number getNumberOfFilterExpressions()

Gets the number of logical filter expressions that have been placed inside the LogicalFilterExpression.

caplin.grid.filter.LogicalFilterExpression.Operator getOperator()

Gets the operator for this LogicalFilterExpression

String getRttpState()

Gets the serialized representation of this LogicalFilterExpression which is understood by the Container Filtering Module used by Transformer.

String getSerializedState(String sIndent)

Gets the XML representation of this LogicalFilterExpression that will be used to save it within a serialized component and/or layout.

void toMap()

Construct map representing the filter

String toString()

Gets a text representation of the logical filter expression.

Constructor Detail

caplin.grid.filter.LogicalFilterExpression(caplin.grid.filter.LogicalFilterExpression.Operator oLogicalOperator)

Constructs a new LogicalFilterExpression with the specified operator.

Parameters
caplin.grid.filter.LogicalFilterExpression.Operator oLogicalOperator The operator that determines whether this logical filter expression will perform a logical AND or OR.
Throws
caplin.core.Error
If the specified operator is not caplin.grid.filter.LogicalFilterExpression.Operator#AND or caplin.grid.filter.LogicalFilterExpression.Operator#OR

Method Detail

void addFilterExpression(caplin.grid.filter.FilterExpression oFilterExpression)

Adds the specified FilterExpression to this LogicalFilterExpression.

Parameters
caplin.grid.filter.FilterExpression oFilterExpression The expression to be added.

<static> caplin.grid.filter.LogicalFilterExpression clone(caplin.grid.filter.FilterExpression oFilterExpression)

Clones a LogicalFilterExpression

Parameters
caplin.grid.filter.FilterExpression oFilterExpression The expression to be cloned.
Returns
{caplin.grid.filter.LogicalFilterExpression} a new instance of a LogicalFilterExpression with exactly the same state as the passed oFilterExpression.

caplin.grid.filter.LogicalFilterExpression clone()

Clones this instance of the LogicalFilterExpression

Returns
{caplin.grid.filter.LogicalFilterExpression} a new instance of a LogicalFilterExpression with exactly the same state.
See
caplin.grid.filter.FilterExpressionAccessor#clone

Array getFilterExpressions()

Returns a list of the filter expressions added using #addFilterExpression.

The array returned by this method must not be added to or removed from directly — in the future, the array returned may instead be a copy of the internally held array. Instead, the methods on this class should be used to add filter expressions.

Returns
A list of caplin.grid.filter.FilterExpression items.
See
caplin.grid.filter.FilterExpressionAccessor#getFilterExpressions

Number getNumberOfFilterExpressions()

Gets the number of logical filter expressions that have been placed inside the LogicalFilterExpression.

Returns
Number of Filter expressions added to date.
See
caplin.grid.filter.FilterExpressionAccessor#getNumberOfFilterExpressions

caplin.grid.filter.LogicalFilterExpression.Operator getOperator()

Gets the operator for this LogicalFilterExpression

Returns
The operator for this LogicalFilterExpression
See
caplin.grid.filter.FilterExpressionAccessor#getOperator

String getRttpState()

Gets the serialized representation of this LogicalFilterExpression which is understood by the Container Filtering Module used by Transformer.

Returns
A serialized representation of this expression.
See
caplin.grid.filter.FilterExpression#getRttpState

String getSerializedState(String sIndent)

Gets the XML representation of this LogicalFilterExpression that will be used to save it within a serialized component and/or layout.

Parameters
String sIndent The number of characters the caller would like the expression to indent the XML it returns to make it easily human readable.
Returns
An XML representation of this expression.
See
caplin.grid.filter.FilterExpression#getSerializedState

void toMap()

Construct map representing the filter

String toString()

Gets a text representation of the logical filter expression.

Returns
A text representation of the expression.
See
caplin.grid.filter.FilterExpressionAccessor#toString