类 TypeResolver

    • 方法详细资料

      • registerTypeOverride

        public void registerTypeOverride​(BasicType type)
        已过时。
      • registerTypeOverride

        public void registerTypeOverride​(UserType type,
                                         String[] keys)
        已过时。
      • getTypeFactory

        public TypeFactory getTypeFactory()
        已过时。
      • basic

        public BasicType basic​(String name)
        已过时。
        Locate a Hibernate basic type given (one of) its registration names.
        参数:
        name - The registration name
        返回:
        The registered type
      • heuristicType

        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.

        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
        参数:
        typeName - The name (see heuristic algorithm above).
        parameters - Any parameters for the type. Only applied if built!
        返回:
        The deduced type; may be null.
        抛出:
        MappingException - Indicates a problem attempting to resolve 'typeName' as a Class