Class UnknownTypeHandler

  • All Implemented Interfaces:
    TypeHandler<java.lang.Object>

    public class UnknownTypeHandler
    extends BaseTypeHandler<java.lang.Object>
    • Constructor Detail

      • UnknownTypeHandler

        public UnknownTypeHandler​(Configuration configuration)
        The constructor that pass a MyBatis configuration.
        Parameters:
        configuration - a MyBatis configuration
        Since:
        3.5.4
      • UnknownTypeHandler

        @Deprecated
        public UnknownTypeHandler​(TypeHandlerRegistry typeHandlerRegistry)
        Deprecated.
        Since 3.5.4, please use the UnknownTypeHandler(Configuration).
        The constructor that pass the type handler registry.
        Parameters:
        typeHandlerRegistry - a type handler registry
    • Method Detail

      • setNonNullParameter

        public void setNonNullParameter​(java.sql.PreparedStatement ps,
                                        int i,
                                        java.lang.Object parameter,
                                        JdbcType jdbcType)
                                 throws java.sql.SQLException
        Specified by:
        setNonNullParameter in class BaseTypeHandler<java.lang.Object>
        Throws:
        java.sql.SQLException
      • getNullableResult

        public java.lang.Object getNullableResult​(java.sql.ResultSet rs,
                                                  java.lang.String columnName)
                                           throws java.sql.SQLException
        Description copied from class: BaseTypeHandler
        Gets the nullable result.
        Specified by:
        getNullableResult in class BaseTypeHandler<java.lang.Object>
        Parameters:
        rs - the rs
        columnName - Colunm name, when configuration useColumnLabel is false
        Returns:
        the nullable result
        Throws:
        java.sql.SQLException - the SQL exception
      • getNullableResult

        public java.lang.Object getNullableResult​(java.sql.ResultSet rs,
                                                  int columnIndex)
                                           throws java.sql.SQLException
        Specified by:
        getNullableResult in class BaseTypeHandler<java.lang.Object>
        Throws:
        java.sql.SQLException
      • getNullableResult

        public java.lang.Object getNullableResult​(java.sql.CallableStatement cs,
                                                  int columnIndex)
                                           throws java.sql.SQLException
        Specified by:
        getNullableResult in class BaseTypeHandler<java.lang.Object>
        Throws:
        java.sql.SQLException
      • resolveTypeHandler

        private TypeHandler<?> resolveTypeHandler​(java.lang.Object parameter,
                                                  JdbcType jdbcType)
      • resolveTypeHandler

        private TypeHandler<?> resolveTypeHandler​(java.sql.ResultSet rs,
                                                  java.lang.String column)
      • resolveTypeHandler

        private TypeHandler<?> resolveTypeHandler​(java.sql.ResultSetMetaData rsmd,
                                                  java.lang.Integer columnIndex)
      • safeGetJdbcTypeForColumn

        private JdbcType safeGetJdbcTypeForColumn​(java.sql.ResultSetMetaData rsmd,
                                                  java.lang.Integer columnIndex)
      • safeGetClassForColumn

        private java.lang.Class<?> safeGetClassForColumn​(java.sql.ResultSetMetaData rsmd,
                                                         java.lang.Integer columnIndex)