|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hibernate.type.TypeResolver
public class TypeResolver
Acts as the contract for getting types and as the mediator between BasicTypeRegistry
and TypeFactory
.
Constructor Summary | |
---|---|
TypeResolver()
|
|
TypeResolver(BasicTypeRegistry basicTypeRegistry,
TypeFactory typeFactory)
|
Method Summary | |
---|---|
BasicType |
basic(String name)
Locate a Hibernate basic type given (one of) its registration names. |
TypeFactory |
getTypeFactory()
|
Type |
heuristicType(String typeName)
See heuristicType(String, Properties) |
Type |
heuristicType(String typeName,
Properties parameters)
Uses heuristics to deduce the proper Type given a string naming the type or Java class. |
void |
registerTypeOverride(BasicType type)
|
void |
registerTypeOverride(CompositeUserType type,
String[] keys)
|
void |
registerTypeOverride(UserType type,
String[] keys)
|
TypeResolver |
scope(SessionFactoryImplementor factory)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TypeResolver()
public TypeResolver(BasicTypeRegistry basicTypeRegistry, TypeFactory typeFactory)
Method Detail |
---|
public TypeResolver scope(SessionFactoryImplementor factory)
public void registerTypeOverride(BasicType type)
public void registerTypeOverride(UserType type, String[] keys)
public void registerTypeOverride(CompositeUserType type, String[] keys)
public TypeFactory getTypeFactory()
public BasicType basic(String name)
name
- The registration name
public Type heuristicType(String typeName) throws MappingException
heuristicType(String, Properties)
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
Type
given a string naming the type or Java class.
The search goes as follows:Type
implementor, return an instanceCompositeUserType
or a UserType
, return an instance of class wrapped intot the appropriate Type
adapterLifecycle
, return the corresponding entity typeSerializable
, return the corresponding serializable type
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 Class
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |