Class BaseTypeHandler<T>

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected Configuration configuration
      Deprecated.
      Since 3.5.0 - See https://github.com/mybatis/mybatis-3/issues/1203.
    • Constructor Summary

      Constructors 
      Constructor Description
      BaseTypeHandler()  
    • Method Summary

      Modifier and Type Method Description
      abstract T getNullableResult​(java.sql.CallableStatement cs, int columnIndex)  
      abstract T getNullableResult​(java.sql.ResultSet rs, int columnIndex)  
      abstract T getNullableResult​(java.sql.ResultSet rs, java.lang.String columnName)  
      T getResult​(java.sql.CallableStatement cs, int columnIndex)  
      T getResult​(java.sql.ResultSet rs, int columnIndex)  
      T getResult​(java.sql.ResultSet rs, java.lang.String columnName)  
      void setConfiguration​(Configuration c)
      Deprecated.
      Since 3.5.0 - See https://github.com/mybatis/mybatis-3/issues/1203.
      abstract void setNonNullParameter​(java.sql.PreparedStatement ps, int i, T parameter, JdbcType jdbcType)  
      void setParameter​(java.sql.PreparedStatement ps, int i, T parameter, JdbcType jdbcType)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • configuration

        @Deprecated
        protected Configuration configuration
        Deprecated.
        Since 3.5.0 - See https://github.com/mybatis/mybatis-3/issues/1203. This field will remove future.
    • Constructor Detail

      • BaseTypeHandler

        public BaseTypeHandler()
    • Method Detail

      • setConfiguration

        @Deprecated
        public void setConfiguration​(Configuration c)
        Deprecated.
        Since 3.5.0 - See https://github.com/mybatis/mybatis-3/issues/1203. This property will remove future.
      • setParameter

        public void setParameter​(java.sql.PreparedStatement ps,
                                 int i,
                                 T parameter,
                                 JdbcType jdbcType)
                          throws java.sql.SQLException
        Specified by:
        setParameter in interface TypeHandler<T>
        Throws:
        java.sql.SQLException
      • getResult

        public T getResult​(java.sql.ResultSet rs,
                           java.lang.String columnName)
                    throws java.sql.SQLException
        Specified by:
        getResult in interface TypeHandler<T>
        columnName - Colunm name, when configuration useColumnLabel is false
        Throws:
        java.sql.SQLException
      • getResult

        public T getResult​(java.sql.ResultSet rs,
                           int columnIndex)
                    throws java.sql.SQLException
        Specified by:
        getResult in interface TypeHandler<T>
        Throws:
        java.sql.SQLException
      • getResult

        public T getResult​(java.sql.CallableStatement cs,
                           int columnIndex)
                    throws java.sql.SQLException
        Specified by:
        getResult in interface TypeHandler<T>
        Throws:
        java.sql.SQLException
      • setNonNullParameter

        public abstract void setNonNullParameter​(java.sql.PreparedStatement ps,
                                                 int i,
                                                 T parameter,
                                                 JdbcType jdbcType)
                                          throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getNullableResult

        public abstract T getNullableResult​(java.sql.ResultSet rs,
                                            java.lang.String columnName)
                                     throws java.sql.SQLException
        Parameters:
        columnName - Colunm name, when configuration useColumnLabel is false
        Throws:
        java.sql.SQLException
      • getNullableResult

        public abstract T getNullableResult​(java.sql.ResultSet rs,
                                            int columnIndex)
                                     throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getNullableResult

        public abstract T getNullableResult​(java.sql.CallableStatement cs,
                                            int columnIndex)
                                     throws java.sql.SQLException
        Throws:
        java.sql.SQLException