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

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

public class ValueExpressionSortCriteria
extends com.sun.data.provider.SortCriteria

The ValueExpressionSortCriteria class is an implementation of SortCriteria that simply retrieves the sort value from a ValueBinding which is created using the specified value expression.

See Also:
Serialized Form

Constructor Summary
ValueExpressionSortCriteria()
          Constructs a ValueExpressionSortCriteria with no value expression
ValueExpressionSortCriteria(java.lang.String valueExpression)
          Constructs a ValueExpressionSortCriteria with the specified value expression.
ValueExpressionSortCriteria(java.lang.String valueExpression, boolean ascending)
          Constructs a ValueExpressionSortCriteria with the specified value expression and ascending state.
 
Method Summary
 java.lang.String getCriteriaKey()
          Returns the value expression.
 java.lang.String getDisplayName()
          If no display name is set, this returns the value expression.
 java.lang.String getRequestMapKey()
          Returns the request map variable key that will be used to store the TableRowDataProvider for the current row being sorted.
 java.lang.Object getSortValue(com.sun.data.provider.TableDataProvider provider, com.sun.data.provider.RowKey row)
          Returns the value from a ValueBinding created using the value expression.
 java.lang.String getValueExpression()
          Returns the value expression to use for this sort criteria.
 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 sorted.
 void setValueExpression(java.lang.String valueExpression)
          Sets the value expression for this sort criteria.
 
Methods inherited from class com.sun.data.provider.SortCriteria
isAscending, setAscending, setDisplayName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValueExpressionSortCriteria

public ValueExpressionSortCriteria()
Constructs a ValueExpressionSortCriteria with no value expression


ValueExpressionSortCriteria

public ValueExpressionSortCriteria(java.lang.String valueExpression)
Constructs a ValueExpressionSortCriteria with the specified value expression.

Parameters:
valueExpression - The desired value expression

ValueExpressionSortCriteria

public ValueExpressionSortCriteria(java.lang.String valueExpression,
                                   boolean ascending)
Constructs a ValueExpressionSortCriteria with the specified value expression and ascending state.

Parameters:
valueExpression - The desired value expression
ascending - The desired boolean state for the ascending property
Method Detail

getValueExpression

public java.lang.String getValueExpression()
Returns the value expression to use for this sort criteria.

Returns:
The currently set value expression for this sort criteria

setValueExpression

public void setValueExpression(java.lang.String valueExpression)
Sets the value expression for this sort criteria.

Parameters:
valueExpression - The desired value expression for this sort criteria

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 sorted. This allows value expressions to refer to the "current" row during the sort 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 sorted. This allows value expressions to refer to the "current" row during the sort operation.

Parameters:
requestMapKey - String key to use for the TableRowDataProvider

getDisplayName

public java.lang.String getDisplayName()

If no display name is set, this returns the value expression.

Overrides:
getDisplayName in class com.sun.data.provider.SortCriteria

getCriteriaKey

public java.lang.String getCriteriaKey()
Returns the value expression.

Specified by:
getCriteriaKey in class com.sun.data.provider.SortCriteria

getSortValue

public java.lang.Object getSortValue(com.sun.data.provider.TableDataProvider provider,
                                     com.sun.data.provider.RowKey row)

Returns the value from a ValueBinding created using the value expression. The passed arguments are ignored.

Specified by:
getSortValue in class com.sun.data.provider.SortCriteria