Class SerializableType<T extends Serializable>
java.lang.Object
org.hibernate.type.AbstractStandardBasicType<T>
org.hibernate.type.AbstractSingleColumnStandardBasicType<T>
org.hibernate.type.SerializableType<T>
- All Implemented Interfaces:
BasicType<T>, Type<T>, Serializable, BasicValuedMapping, Bindable, JdbcMapping, JdbcMappingContainer, MappingModelExpressible, MappingType, SqlExpressible, ValueMapping, BasicDomainType<T>, DomainType<T>, ReturnableType<T>, SimpleDomainType<T>, SqmBindableType<T>, SqmExpressible<T>, SqmDomainType<T>, BasicType<T>, BindableType<T>, JavaTypedExpressible, OutputableType<T>, ProcedureParameterExtractionAware<T>, ProcedureParameterNamedBinder<T>, Type
public class SerializableType<T extends Serializable>
extends AbstractSingleColumnStandardBasicType<T>
A type that maps between a
VARBINARY and Serializable classes.
Notice specifically the 3 constructors:
INSTANCEindicates a mapping using theSerializableinterface itself.SerializableType(Class)indicates a mapping using the specific classSerializableType(JavaType)indicates a mapping using the specific JavaType
The important distinction has to do with locating the appropriate ClassLoader to use during deserialization.
In the fist form we are always using the ClassLoader of the JVM (Hibernate will always fallback to trying
its classloader as well). The second and third forms are better at targeting the needed ClassLoader actually needed.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface Bindable
Bindable.JdbcValuesBiConsumer<X,Y>, Bindable.JdbcValuesConsumer Nested classes/interfaces inherited from interface Type
Type.PersistenceType -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSerializableType(Class<T> serializableClass) SerializableType(JavaType<T> jtd) -
Method Summary
Methods inherited from class AbstractSingleColumnStandardBasicType
nullSafeSetMethods inherited from class AbstractStandardBasicType
assemble, beforeAssemble, canDoExtraction, canDoSetting, compare, deepCopy, disassemble, extract, extract, fromString, getCastType, getColumnSpan, getHashCode, getHashCode, getJavaType, getJavaTypeDescriptor, getJdbcLiteralFormatter, getJdbcType, getJdbcValueBinder, getJdbcValueExtractor, getMutabilityPlan, getRegistrationKeys, getReturnedClass, getSqlTypeCodes, getTypeForEqualsHashCode, isAnyType, isAssociationType, isCollectionType, isComponentType, isDirty, isDirty, isDirty, isEntityType, isEqual, isEqual, isModified, isMutable, isSame, nullSafeSet, nullSafeSet, nullSafeSet, nullSafeSet, registerUnderJavaType, replace, replace, toColumnNullness, toLoggableStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface BasicDomainType
getPersistenceTypeMethods inherited from interface BasicType
compare, disassemble, forEachDisassembledJdbcValue, forEachJdbcType, forEachJdbcType, getCheckCondition, getExpressibleJavaType, getJdbcMapping, getJdbcMapping, getJdbcTypeCount, getMappedJavaType, getMappedType, getSingleJdbcMapping, getSqmType, getValueConverterMethods inherited from interface BasicValuedMapping
addToCacheKeyMethods inherited from interface Bindable
forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachJdbcValue, forEachJdbcValue, forEachJdbcValue, forEachJdbcValueMethods inherited from interface JdbcMapping
convertToDomainValue, convertToRelationalValue, getJdbcJavaTypeMethods inherited from interface SqmBindableType
resolveExpressibleMethods inherited from interface SqmDomainType
getTupleLength, getTypeNameMethods inherited from interface SqmExpressible
getRelationalJavaTypeMethods inherited from interface Type
assemble, beforeAssemble, compare, deepCopy, disassemble, disassemble, getColumnSpan, getHashCode, getHashCode, getReturnedClass, getReturnedClassName, getSqlTypeCodes, getTypeForEqualsHashCode, isAnyType, isAssociationType, isCollectionType, isComponentType, isDirty, isDirty, isEntityType, isEqual, isEqual, isModified, isMutable, isSame, nullSafeSet, replace, replace, toColumnNullness, toLoggableStringMethods inherited from interface ValueMapping
treatAs
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
SerializableType
-
SerializableType
-
-
Method Details
-
getName
-