Class TypeResolver

    • Method Detail

      • registerTypeOverride

        public void registerTypeOverride​(BasicType type)
        Deprecated.
      • registerTypeOverride

        public void registerTypeOverride​(UserType 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,
                                  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