|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface JavaTypeDescriptor<T>
Descriptor for the Java side of a value mapping.
| Method Summary | ||
|---|---|---|
boolean |
areEqual(T one,
T another)
Determine if two instances are equal |
|
int |
extractHashCode(T value)
Extract a proper hash code for this value. |
|
String |
extractLoggableRepresentation(T value)
Extract a loggable representation of the value. |
|
T |
fromString(String string)
|
|
Comparator<T> |
getComparator()
Retrieve the natural comparator for this type. |
|
Class<T> |
getJavaTypeClass()
Retrieve the Java type handled here. |
|
MutabilityPlan<T> |
getMutabilityPlan()
Retrieve the mutability plan for this Java type. |
|
String |
toString(T value)
|
|
|
unwrap(T value,
Class<X> type,
WrapperOptions options)
Unwrap an instance of our handled Java type into the requested type. |
|
|
wrap(X value,
WrapperOptions options)
Wrap a value as our handled Java type. |
|
| Method Detail |
|---|
Class<T> getJavaTypeClass()
MutabilityPlan<T> getMutabilityPlan()
Comparator<T> getComparator()
int extractHashCode(T value)
value - The value for which to extract a hash code.
boolean areEqual(T one,
T another)
one - One instanceanother - The other instance
String extractLoggableRepresentation(T value)
value - The value for which to extract a loggable representation.
String toString(T value)
T fromString(String string)
<X> X unwrap(T value,
Class<X> type,
WrapperOptions options)
JavaTypeDescriptor<Integer> and we are asked to unwrap
the Integer value as a Long we would return something like
Long.valueOf( value.longValue() ).
Intended use is during PreparedStatement binding.
X - The conversion type.value - The value to unwraptype - The type as which to unwrapoptions - The options
<X> T wrap(X value,
WrapperOptions options)
ResultSet extraction.
X - The conversion type.value - The value to wrap.options - The options
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||