| java.lang.Object com.sun.data.provider.FieldKey
FieldKey | public class FieldKey implements Comparable,Serializable(Code) | | FieldKey is a representation of an identifier for a specific data
element that may be retrieved from a
DataProvider . Specialized
implementations might also provide extra capabilities for navigation
between elements, or other value added services.
FieldKey implements Comparable, to allow for sorting based on the
displayName of the FieldKey. Note that the Comparable equals test may
not correspond to the FieldKey.equals(...) test, as the Comparable
implementation is working with the displayName, while the equals(...)
method works with the fieldId.
author: Joe Nuxoll author: Craig McClanahan |
Constructor Summary | |
public | FieldKey(String fieldId) Constructs a new FieldKey with the specified canonical ID. | public | FieldKey(String fieldId, String displayName) Constructs a new FieldKey with the specified canonical ID and display
name. |
EMPTY_ARRAY | final public static FieldKey[] EMPTY_ARRAY(Code) | | A convenient static empty array to use for no-op method returns
|
FieldKey | public FieldKey(String fieldId)(Code) | | Constructs a new FieldKey with the specified canonical ID.
Parameters: fieldId - The desired canonical ID String |
FieldKey | public FieldKey(String fieldId, String displayName)(Code) | | Constructs a new FieldKey with the specified canonical ID and display
name.
Parameters: fieldId - The desired canonical ID String for this field Parameters: displayName - The desired display name String |
compareTo | public int compareTo(Object o)(Code) | | Standard compareTo implementation (for
Comparable interface).
This method compares FieldKeys for sorting by comparing the displayName
values.
Parameters: o - Object to compare a negative integer, zero, or a positive integer as this objectis less than, equal to, or greater than the specified object. See Also: Comparable.compareTo(Object) |
equals | public boolean equals(Object o)(Code) | | Standard equals implementation. This method compares the FieldKey id
values for equality.
Parameters: o - the Object to check equality true if equal, false if not See Also: Object.equals(Object) |
getDisplayName | public String getDisplayName()(Code) | | the display name for this data element, suitable forinclusion in a menu of available options. |
hashCode | public int hashCode()(Code) | | the hashCode of a blank String if the FieldKey id is null, or thehashCode of the FieldKey id otherwise. See Also: Object.hashCode |
setDisplayName | public void setDisplayName(String displayName)(Code) | | Parameters: displayName - The display name for this data element, suitable forinclusion in a menu of available options. |
setFieldId | public void setFieldId(String fieldId)(Code) | | Parameters: fieldId - the canonical internal identifier of this FieldKey |
|
|