public abstract class

AbstractTypeDescriptor

extends Object
implements Serializable JavaTypeDescriptor<T>
java.lang.Object
   ↳ org.hibernate.type.descriptor.java.AbstractTypeDescriptor<T>
Known Direct Subclasses

Class Overview

Abstract adapter for Java type descriptors.

Summary

Protected Constructors
AbstractTypeDescriptor(Class<T> type)
Initialize a type descriptor for the given type.
AbstractTypeDescriptor(Class<T> type, MutabilityPlan<T> mutabilityPlan)
Initialize a type descriptor for the given type.
Public Methods
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 Methods
HibernateException unknownUnwrap(Class conversionType)
HibernateException unknownWrap(Class conversionType)
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.hibernate.type.descriptor.java.JavaTypeDescriptor

Protected Constructors

protected AbstractTypeDescriptor (Class<T> type)

Initialize a type descriptor for the given type. Assumed immutable.

Parameters
type The Java type.

protected AbstractTypeDescriptor (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.

Public Methods

public boolean areEqual (T one, T another)

Determine if two instances are equal

Parameters
one One instance
another The other instance
Returns
  • True if the two are considered equal; false otherwise.

public int extractHashCode (T value)

Extract a proper hash code for this value.

Parameters
value The value for which to extract a hash code.
Returns
  • The extracted hash code.

public String extractLoggableRepresentation (T value)

Extract a loggable representation of the value.

Parameters
value The value for which to extract a loggable representation.
Returns
  • The loggable representation

public Comparator<T> getComparator ()

Retrieve the natural comparator for this type.

Returns
  • The natural comparator.

public Class<T> getJavaTypeClass ()

Retrieve the Java type handled here.

Returns
  • The Java type.

public MutabilityPlan<T> getMutabilityPlan ()

Retrieve the mutability plan for this Java type.

Returns
  • The mutability plan

Protected Methods

protected HibernateException unknownUnwrap (Class conversionType)

protected HibernateException unknownWrap (Class conversionType)