@Deprecated public class TypeResolver extends Object implements Serializable
Acts as the contract for getting types and as the mediator between BasicTypeRegistry and TypeFactory.
| Constructor and Description |
|---|
TypeResolver(TypeConfiguration typeConfiguration,
TypeFactory typeFactory)
Deprecated.
|
| Modifier and Type | Method and 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 proper
Type 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.
|
public TypeResolver(TypeConfiguration typeConfiguration, TypeFactory typeFactory)
public void registerTypeOverride(BasicType type)
public void registerTypeOverride(CompositeUserType type, String[] keys)
public TypeFactory getTypeFactory()
public BasicType basic(String name)
Locate a Hibernate basic type given (one of) its registration names.
name - The registration namepublic Type heuristicType(String typeName) throws MappingException
typeName - The name (see heuristic algorithm discussion on heuristicType(String, Properties)).MappingException - Can be thrown from heuristicType(String, Properties)public Type heuristicType(String typeName, Properties parameters) throws MappingException
Uses heuristics to deduce the proper Type given a string naming the type or Java class.
<p/>
The search goes as follows:<ol>
<li>search for a basic type with 'typeName' as a registration key</li>
<li>
look for 'typeName' as a class name and<ol>
<li>if it names a Type implementor, return an instance</li>
<li>if it names a CompositeUserType or a UserType, return an instance of class wrapped intot the appropriate Type adapter</li>
<li>if it implements Lifecycle, return the corresponding entity type</li>
<li>if it implements Serializable, return the corresponding serializable type</li>
</ol>
</li>
</ol>
typeName - The name (see heuristic algorithm above).parameters - Any parameters for the type. Only applied if built!MappingException - Indicates a problem attempting to resolve 'typeName' as a ClassCopyright © 2001-2018 Red Hat, Inc. All Rights Reserved.