Class StringColumnTranslator

  • All Implemented Interfaces:
    ColumnTranslator, ColumnWriter

    public class StringColumnTranslator
    extends FormattableColumnTranslator
    implements ColumnWriter
    Column Translator implementation for handling string types

    In the adapter configuration file this class is aliased as jdbc-type-string-column-translator which is the preferred alternative to the fully qualified classname when building your configuration.

    • Constructor Detail

      • StringColumnTranslator

        public StringColumnTranslator()
    • Method Detail

      • translate

        public java.lang.String translate​(JdbcResultRow rs,
                                          int column)
                                   throws java.sql.SQLException,
                                          java.io.IOException
        Description copied from interface: ColumnTranslator
        Translate the column into a String.
        Specified by:
        translate in interface ColumnTranslator
        Parameters:
        rs - the result set
        column - the column index
        Returns:
        The String representation of the column
        Throws:
        java.sql.SQLException
        java.io.IOException
      • translate

        public java.lang.String translate​(JdbcResultRow rs,
                                          java.lang.String columnName)
                                   throws java.sql.SQLException,
                                          java.io.IOException
        Description copied from interface: ColumnTranslator
        Translate the column into a String.
        Specified by:
        translate in interface ColumnTranslator
        Parameters:
        rs - the result set
        columnName - the column name
        Returns:
        The String representation of the column
        Throws:
        java.sql.SQLException
        java.io.IOException
      • write

        public void write​(JdbcResultRow rs,
                          int column,
                          java.io.OutputStream out)
                   throws java.sql.SQLException,
                          java.io.IOException
        Description copied from interface: ColumnWriter
        Write the column into the specified outputstream.
        Specified by:
        write in interface ColumnWriter
        Parameters:
        rs - the result set
        column - the column index
        out - the outputstream
        Throws:
        java.sql.SQLException
        java.io.IOException
      • write

        public void write​(JdbcResultRow rs,
                          java.lang.String columnName,
                          java.io.OutputStream out)
                   throws java.sql.SQLException,
                          java.io.IOException
        Description copied from interface: ColumnWriter
        Write the column into the specified outputstream.
        Specified by:
        write in interface ColumnWriter
        Parameters:
        rs - the result set
        columnName - the column name
        out - the outputstream
        Throws:
        java.sql.SQLException
        java.io.IOException