|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.data.provider.SortCriteria com.sun.data.provider.impl.FieldKeySortCriteria
The FieldKeySortCriteria class is an implementation of SortCriteria that
simply retrieves the sort value from the TableDataProvider
for the
current RowKey
using the specified FieldKey
.
Constructor Summary | |
FieldKeySortCriteria()
Constructs a FieldKeySortCriteria with no associated FieldKey . |
|
FieldKeySortCriteria(FieldKey fieldKey)
Constructs a FieldKeySortCriteria with the specified FieldKey . |
|
FieldKeySortCriteria(FieldKey fieldKey,
boolean ascending)
Constructs a FieldKeySortCriteria with the specified FieldKey and
ascending state. |
Method Summary | |
java.lang.String |
getCriteriaKey()
Returns the FieldKey's fieldId. |
java.lang.String |
getDisplayName()
If no display name is set, this returns the FieldKey 's
display name. |
FieldKey |
getFieldKey()
Returns the FieldKey to use for this sort criteria. |
java.lang.Object |
getSortValue(TableDataProvider provider,
RowKey row)
Returns the value from the TableDataProvider stored under the
FieldKey and RowKey . |
void |
setFieldKey(FieldKey fieldKey)
Sets the FieldKey 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 |
public FieldKeySortCriteria()
FieldKey
.
public FieldKeySortCriteria(FieldKey fieldKey)
FieldKey
.
fieldKey
- The desired FieldKeypublic FieldKeySortCriteria(FieldKey fieldKey, boolean ascending)
FieldKey
and
ascending state.
fieldKey
- The desired FieldKeyascending
- The desired boolean state for the ascending propertyMethod Detail |
public FieldKey getFieldKey()
public void setFieldKey(FieldKey fieldKey)
fieldKey
- The desired FieldKey for this sort criteriapublic java.lang.String getDisplayName()
If no display name is set, this returns the FieldKey
's
display name.
Returns the display name for this sort criteria.
getDisplayName
in class SortCriteria
public java.lang.String getCriteriaKey()
getCriteriaKey
in class SortCriteria
public java.lang.Object getSortValue(TableDataProvider provider, RowKey row) throws DataProviderException
Returns the value from the TableDataProvider
stored under the
FieldKey
and RowKey
.
Provides the data value to use while sorting a particular row. Implementations may perform whatever logic is desired to provide the data object to represent this row in a sort.
getSortValue
in class SortCriteria
provider
- TableDataProvider
containing the data on displayrow
- The RowKey
of the row to be sorted
DataProviderException
- Implementations may wish to surface
internal exceptions (nested in DataProviderException) rather
than simply returning null. A DPE may also indicate that the
passed TableDataProvider or RowKey is not valid. Consult the
documentation of the specific SortCriteria implementation for
details on what exceptions might be wrapped by a DPE.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |