org.ujac.util.table
Class RowFilterRuleSet

java.lang.Object
  extended by org.ujac.util.table.RowFilterRuleSet
All Implemented Interfaces:
RowFilterRule

public class RowFilterRuleSet
extends Object
implements RowFilterRule

Name: RowFilterRuleSet
Description: A set of rules which combines table row rules.

Author:
lauerc

Field Summary
static Integer AND
          The connector type 'AND'.
static Integer OR
          The connector type 'OR'.
 
Constructor Summary
RowFilterRuleSet(RowFilterRule firstRule)
          Constructs a RowFilterRuleSet instance with specific attributes.
 
Method Summary
 RowFilterRuleSet add(Integer connector, RowFilterRule rule)
          Adds another rule to the connector.
 void setup(Table table)
          Sets up the rule.
 boolean test(Row row)
          Tests the filter rule for the given row.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AND

public static final Integer AND
The connector type 'AND'.


OR

public static final Integer OR
The connector type 'OR'.

Constructor Detail

RowFilterRuleSet

public RowFilterRuleSet(RowFilterRule firstRule)
Constructs a RowFilterRuleSet instance with specific attributes.

Parameters:
firstRule - The first rule to adds.
Method Detail

add

public RowFilterRuleSet add(Integer connector,
                            RowFilterRule rule)
Adds another rule to the connector.

Parameters:
connector - The connector (AND/OR).
rule - The rule to add
Returns:
A reference to this class to provide a more fluent interface.

setup

public void setup(Table table)
           throws TableException
Sets up the rule.

Specified by:
setup in interface RowFilterRule
Parameters:
table - The table for which set up the rule.
Throws:
TableException - In case a table handling failure occurred.

test

public boolean test(Row row)
             throws TableException
Description copied from interface: RowFilterRule
Tests the filter rule for the given row.

Specified by:
test in interface RowFilterRule
Parameters:
row - The row to test.
Returns:
true in case the test was successfully passed valid, else false.
Throws:
TableException - In case a table handling failure occurred.
See Also:
RowFilterRule.test(org.ujac.util.table.Row)


Copyright © 2003-2004 UJAC.org. All Rights Reserved.