Package org.hibernate.type
Class TypeResolver
- java.lang.Object
-
- org.hibernate.type.TypeResolver
-
- All Implemented Interfaces:
java.io.Serializable
@Deprecated public class TypeResolver extends java.lang.Object implements java.io.SerializableDeprecated.(since 5.3) No replacement, access to and handling of Types will be much different in 6.0Acts as the contract for getting types and as the mediator betweenBasicTypeRegistryandTypeFactory.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TypeResolver(TypeConfiguration typeConfiguration, TypeFactory typeFactory)Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description BasicTypebasic(java.lang.String name)Deprecated.Locate a Hibernate basic type given (one of) its registration names.TypeFactorygetTypeFactory()Deprecated.TypeheuristicType(java.lang.String typeName)Deprecated.TypeheuristicType(java.lang.String typeName, java.util.Properties parameters)Deprecated.Uses heuristics to deduce the properTypegiven a string naming the type or Java class.voidregisterTypeOverride(BasicType type)Deprecated.voidregisterTypeOverride(CompositeUserType type, java.lang.String[] keys)Deprecated.voidregisterTypeOverride(UserType type, java.lang.String[] keys)Deprecated.
-
-
-
Constructor Detail
-
TypeResolver
public TypeResolver(TypeConfiguration typeConfiguration, TypeFactory typeFactory)
Deprecated.
-
-
Method Detail
-
registerTypeOverride
public void registerTypeOverride(BasicType type)
Deprecated.
-
registerTypeOverride
public void registerTypeOverride(UserType type, java.lang.String[] keys)
Deprecated.
-
registerTypeOverride
public void registerTypeOverride(CompositeUserType type, java.lang.String[] keys)
Deprecated.
-
getTypeFactory
public TypeFactory getTypeFactory()
Deprecated.
-
basic
public BasicType basic(java.lang.String name)
Deprecated.Locate a Hibernate basic type given (one of) its registration names.- Parameters:
name- The registration name- Returns:
- The registered type
-
heuristicType
public Type heuristicType(java.lang.String typeName) throws MappingException
Deprecated.- Parameters:
typeName- The name (see heuristic algorithm discussion onheuristicType(String, Properties)).- Returns:
- The deduced type; may be null.
- Throws:
MappingException- Can be thrown fromheuristicType(String, Properties)
-
heuristicType
public Type heuristicType(java.lang.String typeName, java.util.Properties parameters) throws MappingException
Deprecated.Uses heuristics to deduce the properTypegiven a string naming the type or Java class. The search goes as follows:- search for a basic type with 'typeName' as a registration key
-
look for 'typeName' as a class name and
- if it names a
Typeimplementor, return an instance - if it names a
CompositeUserTypeor aUserType, return an instance of class wrapped into the appropriateTypeadapter - if it implements
Lifecycle, return the corresponding entity type - if it implements
Serializable, return the corresponding serializable type
- if it names a
- Parameters:
typeName- The name (see heuristic algorithm above).parameters- Any parameters for the type. Only applied if built!- Returns:
- The deduced type; may be null.
- Throws:
MappingException- Indicates a problem attempting to resolve 'typeName' as aClass
-
-