Package org.hibernate.type
Class TypeResolver
- java.lang.Object
-
- org.hibernate.type.TypeResolver
-
- All Implemented Interfaces:
Serializable
@Deprecated public class TypeResolver extends Object implements Serializable
Deprecated.(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 betweenBasicTypeRegistry
andTypeFactory
.- 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 BasicType
basic(String name)
Deprecated.Locate a Hibernate basic type given (one of) its registration names.TypeFactory
getTypeFactory()
Deprecated.Type
heuristicType(String typeName)
Deprecated.Type
heuristicType(String typeName, Properties parameters)
Deprecated.Uses heuristics to deduce the properType
given a string naming the type or Java class.void
registerTypeOverride(BasicType type)
Deprecated.void
registerTypeOverride(CompositeUserType type, String[] keys)
Deprecated.void
registerTypeOverride(UserType type, 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(CompositeUserType type, String[] keys)
Deprecated.
-
getTypeFactory
public TypeFactory getTypeFactory()
Deprecated.
-
basic
public BasicType basic(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(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(String typeName, Properties parameters) throws MappingException
Deprecated.Uses heuristics to deduce the properType
given 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
Type
implementor, return an instance - if it names a
CompositeUserType
or aUserType
, return an instance of class wrapped into the appropriateType
adapter - 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
-
-