|
||||||||||
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.FieldIdSortCriteria
The FieldIdSortCriteria class is an implementation of SortCriteria that
simply retrieves the sort value from the TableDataProvider
for the
current RowKey
using the specified fieldId, which is used to
dynamically retrieve a FieldKey
.
Constructor Summary | |
FieldIdSortCriteria()
Constructs a FieldIdSortCriteria with no associated FieldKey . |
|
FieldIdSortCriteria(java.lang.String fieldId)
Constructs a FieldIdSortCriteria with the specified fieldId to use to fetch a FieldKey . |
|
FieldIdSortCriteria(java.lang.String fieldId,
boolean ascending)
Constructs a FieldIdSortCriteria with the specified fieldId and ascending state. |
Method Summary | |
java.lang.String |
getCriteriaKey()
Returns the fieldId. |
java.lang.String |
getDisplayName()
If no display name is set, this returns the fieldId. |
java.lang.String |
getFieldId()
Returns the fieldId to use to retrieve a FieldKey for this sort criteria. |
java.lang.Object |
getSortValue(TableDataProvider provider,
RowKey row)
Returns the value from the TableDataProvider stored under the
FieldKey (retrieved using the fieldId) and RowKey . |
void |
setFieldId(java.lang.String fieldId)
Sets the fieldId to use to fetch a 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 FieldIdSortCriteria()
FieldKey
.
public FieldIdSortCriteria(java.lang.String fieldId)
FieldKey
.
fieldId
- The desired fieldId to use to fetch a FieldKeypublic FieldIdSortCriteria(java.lang.String fieldId, boolean ascending)
fieldId
- The desired fieldId to use to retrieve a FieldKeyascending
- The desired boolean state for the ascending propertyMethod Detail |
public java.lang.String getFieldId()
public void setFieldId(java.lang.String fieldId)
fieldId
- The desired fieldId for this sort criteriapublic java.lang.String getDisplayName()
If no display name is set, this returns the fieldId.
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
(retrieved using the fieldId) 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 |