org.ujac.util.table
Class LikeRowFilterRule

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

public class LikeRowFilterRule
extends BaseRowFilterRule

Name: LikeRowFilterRule
Description: Test whether or not the checked fields values are like to the specified value. Note that this rule can only be applied to string type columns. The underlying test method is implemented in method StringUtils.like(String, String, boolean).

Author:
lauerc

Field Summary
 
Fields inherited from class org.ujac.util.table.BaseRowFilterRule
columnIndex, columnName
 
Constructor Summary
LikeRowFilterRule(String columnName, String value)
          Constructs a LikeRowFilterRule instance with specific attributes.
LikeRowFilterRule(String columnName, String value, boolean caseSensitive)
          Constructs a LikeRowFilterRule instance with specific attributes.
 
Method Summary
 boolean test(Row row)
          Tests the filter rule for the given row.
 
Methods inherited from class org.ujac.util.table.BaseRowFilterRule
setup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LikeRowFilterRule

public LikeRowFilterRule(String columnName,
                         String value)
Constructs a LikeRowFilterRule instance with specific attributes.

Parameters:
columnName - The column name.
value - The value to compare.

LikeRowFilterRule

public LikeRowFilterRule(String columnName,
                         String value,
                         boolean caseSensitive)
Constructs a LikeRowFilterRule instance with specific attributes.

Parameters:
columnName - The column name.
value - The value to compare.
caseSensitive - Tells whether or not to compare string values case sensitive.
Method Detail

test

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

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.