com.sun.rave.web.ui.faces
Class ValueExpressionFilterCriteria

java.lang.Object
  extended by com.sun.data.provider.FilterCriteria
      extended by com.sun.rave.web.ui.faces.ValueExpressionFilterCriteria
All Implemented Interfaces:
java.io.Serializable

public class ValueExpressionFilterCriteria
extends com.sun.data.provider.FilterCriteria

The ValueExpressionFilterCriteria is an implementation of FilterCriteria that compares the value of a String (created with the specified value expression) with a predefined compareValue. A user may specify matches to include less than (<), equal to (==), or greater than (>) the compareValue Object, or any combination of the above.

See Also:
TableDataProvider, TableDataFilter, Serialized Form

Field Summary
protected  java.util.Locale compareLocale
          Storage for the compare locale
protected  boolean matchEqualTo
           
protected  boolean matchGreaterThan
           
protected  boolean matchLessThan
           
 
Constructor Summary
ValueExpressionFilterCriteria()
           
ValueExpressionFilterCriteria(java.lang.Object compareValue)
           
ValueExpressionFilterCriteria(java.lang.String valueExpression)
           
ValueExpressionFilterCriteria(java.lang.String valueExpression, java.lang.Object compareValue)
           
ValueExpressionFilterCriteria(java.lang.String valueExpression, java.lang.Object compareValue, boolean matchLessThan, boolean matchEqualTo, boolean matchGreaterThan)
           
 
Method Summary
 java.util.Locale getCompareLocale()
           
 java.lang.Object getCompareValue()
           
 java.lang.String getDisplayName()
           
 java.lang.String getRequestMapKey()
          Returns the request map variable key that will be used to store the TableRowDataProvider for the current row being match tested.
 java.lang.String getValueExpression()
           
 boolean isMatchEqualTo()
           
 boolean isMatchGreaterThan()
           
 boolean isMatchLessThan()
           
 boolean match(com.sun.data.provider.TableDataProvider provider, com.sun.data.provider.RowKey row)
          This method tests a match by comparing the compareValue and the data value stored under the String.
 void setCompareLocale(java.util.Locale compareLocale)
           
 void setCompareValue(java.lang.Object value)
           
 void setMatchEqualTo(boolean matchEqualTo)
           
 void setMatchGreaterThan(boolean matchGreaterThan)
           
 void setMatchLessThan(boolean matchLessThan)
           
 void setRequestMapKey(java.lang.String requestMapKey)
          Sets the request map variable key that will be used to store the TableRowDataProvider for the current row being match tested.
 void setValueExpression(java.lang.String valueExpression)
           
 
Methods inherited from class com.sun.data.provider.FilterCriteria
isInclude, setDisplayName, setInclude
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

compareLocale

protected java.util.Locale compareLocale
Storage for the compare locale


matchEqualTo

protected boolean matchEqualTo

matchLessThan

protected boolean matchLessThan

matchGreaterThan

protected boolean matchGreaterThan
Constructor Detail

ValueExpressionFilterCriteria

public ValueExpressionFilterCriteria()

ValueExpressionFilterCriteria

public ValueExpressionFilterCriteria(java.lang.String valueExpression)
Parameters:
valueExpression - String

ValueExpressionFilterCriteria

public ValueExpressionFilterCriteria(java.lang.Object compareValue)
Parameters:
compareValue - The desired compare value

ValueExpressionFilterCriteria

public ValueExpressionFilterCriteria(java.lang.String valueExpression,
                                     java.lang.Object compareValue)
Parameters:
valueExpression - String
compareValue - The desired compare value

ValueExpressionFilterCriteria

public ValueExpressionFilterCriteria(java.lang.String valueExpression,
                                     java.lang.Object compareValue,
                                     boolean matchLessThan,
                                     boolean matchEqualTo,
                                     boolean matchGreaterThan)
Parameters:
valueExpression - String
compareValue - Object
matchLessThan - boolean
matchEqualTo - boolean
matchGreaterThan - boolean
Method Detail

getDisplayName

public java.lang.String getDisplayName()
Overrides:
getDisplayName in class com.sun.data.provider.FilterCriteria

setValueExpression

public void setValueExpression(java.lang.String valueExpression)
Parameters:
valueExpression - String

getValueExpression

public java.lang.String getValueExpression()
Returns:
String

getRequestMapKey

public java.lang.String getRequestMapKey()
Returns the request map variable key that will be used to store the TableRowDataProvider for the current row being match tested. This allows value expressions to refer to the "current" row during the filter operation.

Returns:
String key to use for the TableRowDataProvider

setRequestMapKey

public void setRequestMapKey(java.lang.String requestMapKey)
Sets the request map variable key that will be used to store the TableRowDataProvider for the current row being match tested. This allows value expressions to refer to the "current" row during the filter operation.

Parameters:
requestMapKey - String key to use for the TableRowDataProvider

setCompareValue

public void setCompareValue(java.lang.Object value)
Parameters:
value - Object

getCompareValue

public java.lang.Object getCompareValue()
Returns:
Object

setCompareLocale

public void setCompareLocale(java.util.Locale compareLocale)
Parameters:
compareLocale - Locale

getCompareLocale

public java.util.Locale getCompareLocale()
Returns:
Locale

setMatchEqualTo

public void setMatchEqualTo(boolean matchEqualTo)
Parameters:
matchEqualTo - boolean

isMatchEqualTo

public boolean isMatchEqualTo()
Returns:
boolean

setMatchLessThan

public void setMatchLessThan(boolean matchLessThan)
Parameters:
matchLessThan - boolean

isMatchLessThan

public boolean isMatchLessThan()
Returns:
boolean

setMatchGreaterThan

public void setMatchGreaterThan(boolean matchGreaterThan)
Parameters:
matchGreaterThan - boolean

isMatchGreaterThan

public boolean isMatchGreaterThan()
Returns:
boolean

match

public boolean match(com.sun.data.provider.TableDataProvider provider,
                     com.sun.data.provider.RowKey row)

This method tests a match by comparing the compareValue and the data value stored under the String. The passed TableDataProvider and RowKey parameters are ignored. The matchLessThan, matchEqualTo, and matchGreaterThan properties are used to determine if a match was found. The compareLocale is used for String comparisons.

Specified by:
match in class com.sun.data.provider.FilterCriteria