Class ClobReaderTypeHandler

  • All Implemented Interfaces:
    TypeHandler<java.io.Reader>

    public class ClobReaderTypeHandler
    extends BaseTypeHandler<java.io.Reader>
    The TypeHandler for Clob/Reader using method supported at JDBC 4.0.
    Since:
    3.4.0
    Author:
    Kazuki Shimizu
    • Constructor Detail

      • ClobReaderTypeHandler

        public ClobReaderTypeHandler()
    • Method Detail

      • setNonNullParameter

        public void setNonNullParameter​(java.sql.PreparedStatement ps,
                                        int i,
                                        java.io.Reader parameter,
                                        JdbcType jdbcType)
                                 throws java.sql.SQLException
        Set a Reader into PreparedStatement.
        Specified by:
        setNonNullParameter in class BaseTypeHandler<java.io.Reader>
        Throws:
        java.sql.SQLException
        See Also:
        PreparedStatement.setClob(int, Reader)
      • getNullableResult

        public java.io.Reader getNullableResult​(java.sql.ResultSet rs,
                                                java.lang.String columnName)
                                         throws java.sql.SQLException
        Get a Reader that corresponds to a specified column name from ResultSet.
        Specified by:
        getNullableResult in class BaseTypeHandler<java.io.Reader>
        columnName - Colunm name, when configuration useColumnLabel is false
        Throws:
        java.sql.SQLException
        See Also:
        ResultSet.getClob(String)
      • getNullableResult

        public java.io.Reader getNullableResult​(java.sql.ResultSet rs,
                                                int columnIndex)
                                         throws java.sql.SQLException
        Get a Reader that corresponds to a specified column index from ResultSet.
        Specified by:
        getNullableResult in class BaseTypeHandler<java.io.Reader>
        Throws:
        java.sql.SQLException
        See Also:
        ResultSet.getClob(int)
      • getNullableResult

        public java.io.Reader getNullableResult​(java.sql.CallableStatement cs,
                                                int columnIndex)
                                         throws java.sql.SQLException
        Get a Reader that corresponds to a specified column index from CallableStatement.
        Specified by:
        getNullableResult in class BaseTypeHandler<java.io.Reader>
        Throws:
        java.sql.SQLException
        See Also:
        CallableStatement.getClob(int)