Class AbstractTypeDescriptor<T>
- java.lang.Object
-
- org.hibernate.type.descriptor.java.AbstractTypeDescriptor<T>
-
- All Implemented Interfaces:
java.io.Serializable,BasicJavaDescriptor<T>,JavaTypeDescriptor<T>
- Direct Known Subclasses:
BigDecimalTypeDescriptor,BigIntegerTypeDescriptor,BlobTypeDescriptor,BooleanTypeDescriptor,ByteArrayTypeDescriptor,ByteTypeDescriptor,CalendarDateTypeDescriptor,CalendarTimeTypeDescriptor,CalendarTypeDescriptor,CharacterArrayTypeDescriptor,CharacterTypeDescriptor,ClassTypeDescriptor,ClobTypeDescriptor,CurrencyTypeDescriptor,DateTypeDescriptor,DoubleTypeDescriptor,DurationJavaDescriptor,EnumJavaTypeDescriptor,FloatTypeDescriptor,GeolatteGeometryJavaTypeDescriptor,InstantJavaDescriptor,IntegerTypeDescriptor,JavaTypeDescriptorRegistry.FallbackJavaTypeDescriptor,JdbcDateTypeDescriptor,JdbcTimestampTypeDescriptor,JdbcTimeTypeDescriptor,JTSGeometryJavaTypeDescriptor,LocalDateJavaDescriptor,LocalDateTimeJavaDescriptor,LocaleTypeDescriptor,LocalTimeJavaDescriptor,LongTypeDescriptor,NClobTypeDescriptor,OffsetDateTimeJavaDescriptor,OffsetTimeJavaDescriptor,PrimitiveByteArrayTypeDescriptor,PrimitiveCharacterArrayTypeDescriptor,RowVersionTypeDescriptor,SerializableTypeDescriptor,ShortTypeDescriptor,StringTypeDescriptor,TimeZoneTypeDescriptor,UrlTypeDescriptor,UUIDTypeDescriptor,ZonedDateTimeJavaDescriptor
public abstract class AbstractTypeDescriptor<T> extends java.lang.Object implements BasicJavaDescriptor<T>, java.io.Serializable
Abstract adapter for Java type descriptors.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractTypeDescriptor(java.lang.Class<T> type)Initialize a type descriptor for the given type.protectedAbstractTypeDescriptor(java.lang.Class<T> type, MutabilityPlan<T> mutabilityPlan)Initialize a type descriptor for the given type.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanareEqual(T one, T another)Determine if two instances are equalintextractHashCode(T value)Extract a proper hash code for this value.java.lang.StringextractLoggableRepresentation(T value)Extract a loggable representation of the value.java.util.Comparator<T>getComparator()Retrieve the natural comparator for this type.java.lang.Class<T>getJavaType()Get the Java type describedjava.lang.Class<T>getJavaTypeClass()Deprecated.UsegetJavaType()insteadMutabilityPlan<T>getMutabilityPlan()Retrieve the mutability plan for this Java type.protected HibernateExceptionunknownUnwrap(java.lang.Class conversionType)protected HibernateExceptionunknownWrap(java.lang.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.BasicJavaDescriptor
getJdbcRecommendedSqlType
-
Methods inherited from interface org.hibernate.type.descriptor.java.JavaTypeDescriptor
fromString, toString, unwrap, wrap
-
-
-
-
Constructor Detail
-
AbstractTypeDescriptor
protected AbstractTypeDescriptor(java.lang.Class<T> type)
Initialize a type descriptor for the given type. Assumed immutable.- Parameters:
type- The Java type.- See Also:
AbstractTypeDescriptor(Class, MutabilityPlan)
-
AbstractTypeDescriptor
protected AbstractTypeDescriptor(java.lang.Class<T> type, MutabilityPlan<T> mutabilityPlan)
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 Detail
-
getMutabilityPlan
public MutabilityPlan<T> getMutabilityPlan()
Description copied from interface:JavaTypeDescriptorRetrieve the mutability plan for this Java type.- Specified by:
getMutabilityPlanin interfaceJavaTypeDescriptor<T>
-
getJavaType
public java.lang.Class<T> getJavaType()
Description copied from interface:JavaTypeDescriptorGet the Java type described- Specified by:
getJavaTypein interfaceJavaTypeDescriptor<T>
-
getJavaTypeClass
@Deprecated public java.lang.Class<T> getJavaTypeClass()
Deprecated.UsegetJavaType()insteadDescription copied from interface:JavaTypeDescriptorRetrieve the Java type handled here.- Specified by:
getJavaTypeClassin interfaceJavaTypeDescriptor<T>- Returns:
- The Java type.
-
extractHashCode
public int extractHashCode(T value)
Description copied from interface:JavaTypeDescriptorExtract a proper hash code for this value.- Specified by:
extractHashCodein interfaceJavaTypeDescriptor<T>- Parameters:
value- The value for which to extract a hash code.- Returns:
- The extracted hash code.
-
areEqual
public boolean areEqual(T one, T another)
Description copied from interface:JavaTypeDescriptorDetermine if two instances are equal- Specified by:
areEqualin interfaceJavaTypeDescriptor<T>- Parameters:
one- One instanceanother- The other instance- Returns:
- True if the two are considered equal; false otherwise.
-
getComparator
public java.util.Comparator<T> getComparator()
Description copied from interface:JavaTypeDescriptorRetrieve the natural comparator for this type.- Specified by:
getComparatorin interfaceJavaTypeDescriptor<T>
-
extractLoggableRepresentation
public java.lang.String extractLoggableRepresentation(T value)
Description copied from interface:JavaTypeDescriptorExtract a loggable representation of the value.- Specified by:
extractLoggableRepresentationin interfaceJavaTypeDescriptor<T>- Parameters:
value- The value for which to extract a loggable representation.- Returns:
- The loggable representation
-
unknownUnwrap
protected HibernateException unknownUnwrap(java.lang.Class conversionType)
-
unknownWrap
protected HibernateException unknownWrap(java.lang.Class conversionType)
-
-