public abstract class AbstractTypeDescriptor<T> extends Object implements JavaTypeDescriptor<T>, Serializable
Modifier | Constructor and Description |
---|---|
protected |
AbstractTypeDescriptor(Class<T> type)
Initialize a type descriptor for the given type.
|
protected |
AbstractTypeDescriptor(Class<T> type,
MutabilityPlan<T> mutabilityPlan)
Initialize a type descriptor for the given type.
|
Modifier and Type | Method and Description |
---|---|
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.
|
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.
|
protected HibernateException |
unknownUnwrap(Class conversionType) |
protected HibernateException |
unknownWrap(Class conversionType) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
fromString, toString, unwrap, wrap
protected AbstractTypeDescriptor(Class<T> type)
type
- The Java type.AbstractTypeDescriptor(Class, MutabilityPlan)
protected AbstractTypeDescriptor(Class<T> type, MutabilityPlan<T> mutabilityPlan)
type
- The Java type.mutabilityPlan
- The plan for handling mutability aspects of the java type.public MutabilityPlan<T> getMutabilityPlan()
getMutabilityPlan
in interface JavaTypeDescriptor<T>
public Class<T> getJavaTypeClass()
getJavaTypeClass
in interface JavaTypeDescriptor<T>
public int extractHashCode(T value)
extractHashCode
in interface JavaTypeDescriptor<T>
value
- The value for which to extract a hash code.public boolean areEqual(T one, T another)
areEqual
in interface JavaTypeDescriptor<T>
one
- One instanceanother
- The other instancepublic Comparator<T> getComparator()
getComparator
in interface JavaTypeDescriptor<T>
public String extractLoggableRepresentation(T value)
extractLoggableRepresentation
in interface JavaTypeDescriptor<T>
value
- The value for which to extract a loggable representation.protected HibernateException unknownUnwrap(Class conversionType)
protected HibernateException unknownWrap(Class conversionType)
Copyright © 2018 JBoss by Red Hat. All rights reserved.