Class TypeResolver

  • All Implemented Interfaces:
    java.io.Serializable

    @Deprecated
    public class TypeResolver
    extends java.lang.Object
    implements java.io.Serializable
    Deprecated.
    (since 5.3) No replacement, access to and handling of Types will be much different in 6.0
    Acts as the contract for getting types and as the mediator between BasicTypeRegistry and TypeFactory.
    See Also:
    Serialized Form
    • 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,
                                  java.util.Properties parameters)
                           throws MappingException
        Deprecated.
        Uses heuristics to deduce the proper Type given a string naming the type or Java class.

        The search goes as follows:

        1. search for a basic type with 'typeName' as a registration key
        2. look for 'typeName' as a class name and
          1. if it names a Type implementor, return an instance
          2. if it names a CompositeUserType or a UserType, return an instance of class wrapped into the appropriate Type adapter
          3. if it implements Lifecycle, return the corresponding entity type
          4. if it implements Serializable, return the corresponding serializable type
        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 a Class