Class AbstractJavaType<T>
java.lang.Object
org.hibernate.type.descriptor.java.AbstractJavaType<T>
- All Implemented Interfaces:
Serializable
,BasicJavaType<T>
,JavaType<T>
- Direct Known Subclasses:
BasicCollectionJavaType
,FormatMapperBasedJavaType
,GeolatteGeometryJavaType
,JTSGeometryJavaType
,UnknownBasicJavaType
Abstract adapter for Java type descriptors.
- See Also:
- API Note:
- This abstract descriptor implements BasicJavaType
because we currently only categorize "basic" JavaTypes,
as in the
Type.PersistenceType.BASIC
sense
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.hibernate.type.descriptor.java.JavaType
JavaType.CoercionContext
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractJavaType
(Type type) Initialize a type descriptor for the given type.protected
AbstractJavaType
(Type type, MutabilityPlan<T> mutabilityPlan) Initialize a type descriptor for the given type. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Determine if two instances are equalint
extractHashCode
(T value) Extract a proper hash code for the given value.extractLoggableRepresentation
(T value) Extract a loggable representation of the given value.Retrieve the natural comparator for this type.Get the Java type (aType
object) described by thisJavaType
.Retrieve the mutability plan for this Java type.protected HibernateException
unknownUnwrap
(Class<?> conversionType) protected HibernateException
unknownWrap
(Class<?> conversionType) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.hibernate.type.descriptor.java.BasicJavaType
fromString, getRecommendedJdbcType
Methods inherited from interface org.hibernate.type.descriptor.java.JavaType
appendEncodedString, coerce, createJavaType, fromEncodedString, getCheckCondition, getDefaultSqlLength, getDefaultSqlPrecision, getDefaultSqlScale, getDefaultValue, getJavaTypeClass, getLongSqlLength, getReplacement, getTypeName, isInstance, isTemporalType, isWider, toString, unwrap, useObjectEqualsHashCode, wrap
-
Constructor Details
-
AbstractJavaType
Initialize a type descriptor for the given type. Assumed immutable.- Parameters:
type
- The Java type.- See Also:
-
AbstractJavaType
Initialize a type descriptor for the given type. Assumed immutable.- Parameters:
type
- The Java type.mutabilityPlan
- The plan for handling mutability aspects of the java type.
-
-
Method Details
-
getMutabilityPlan
Description copied from interface:JavaType
Retrieve the mutability plan for this Java type.- Specified by:
getMutabilityPlan
in interfaceJavaType<T>
-
getJavaType
Description copied from interface:JavaType
Get the Java type (aType
object) described by thisJavaType
.- Specified by:
getJavaType
in interfaceJavaType<T>
- See Also:
-
extractHashCode
Description copied from interface:JavaType
Extract a proper hash code for the given value.- Specified by:
extractHashCode
in interfaceJavaType<T>
- Parameters:
value
- The value for which to extract a hash code.- Returns:
- The extracted hash code.
-
areEqual
Description copied from interface:JavaType
Determine if two instances are equal -
getComparator
Description copied from interface:JavaType
Retrieve the natural comparator for this type.- Specified by:
getComparator
in interfaceJavaType<T>
-
extractLoggableRepresentation
Description copied from interface:JavaType
Extract a loggable representation of the given value.- Specified by:
extractLoggableRepresentation
in interfaceJavaType<T>
- Parameters:
value
- The value for which to extract a loggable representation.- Returns:
- The loggable representation
-
unknownUnwrap
-
unknownWrap
-