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

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

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

The ValueBindingFilterCriteria is an implementation of FilterCriteria that compares the value of a ValueBinding 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.

Use the requestMapKey property

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
ValueBindingFilterCriteria()
           
ValueBindingFilterCriteria(java.lang.Object compareValue)
           
ValueBindingFilterCriteria(javax.faces.el.ValueBinding valueBinding)
           
ValueBindingFilterCriteria(javax.faces.el.ValueBinding valueBinding, java.lang.Object compareValue)
           
ValueBindingFilterCriteria(javax.faces.el.ValueBinding valueBinding, 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.
 javax.faces.el.ValueBinding getValueBinding()
           
 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 ValueBinding.
 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 setValueBinding(javax.faces.el.ValueBinding valueBinding)
           
 
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

ValueBindingFilterCriteria

public ValueBindingFilterCriteria()

ValueBindingFilterCriteria

public ValueBindingFilterCriteria(javax.faces.el.ValueBinding valueBinding)
Parameters:
valueBinding - ValueBinding

ValueBindingFilterCriteria

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

ValueBindingFilterCriteria

public ValueBindingFilterCriteria(javax.faces.el.ValueBinding valueBinding,
                                  java.lang.Object compareValue)
Parameters:
valueBinding - ValueBinding
compareValue - The desired compare value

ValueBindingFilterCriteria

public ValueBindingFilterCriteria(javax.faces.el.ValueBinding valueBinding,
                                  java.lang.Object compareValue,
                                  boolean matchLessThan,
                                  boolean matchEqualTo,
                                  boolean matchGreaterThan)
Parameters:
valueBinding - ValueBinding
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

setValueBinding

public void setValueBinding(javax.faces.el.ValueBinding valueBinding)
Parameters:
valueBinding - ValueBinding

getValueBinding

public javax.faces.el.ValueBinding getValueBinding()
Returns:
ValueBinding

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 ValueBinding. 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