@Test public void testStringTranslator() throws Exception { JdbcResultRow row = new JdbcResultRow(); row.setFieldValue("testField", "111", Types.VARCHAR); { String translated = translator.translate(row, 0); assertEquals("111", translated); } { String translated = translator.translate(row, "testField"); assertEquals("111", translated); } }
@Override public String translate(JdbcResultRow rs, int column) throws SQLException, IOException { return toString(rs.getFieldValue(column)); }
StringColumnTranslator extends FormattableColumnTranslator implements ColumnWriter { @Override public String translate(JdbcResultRow rs, int column) throws SQLException, IOException { return toString(rs.getFieldValue(column)); } }
StringColumnTranslator extends FormattableColumnTranslator implements ColumnWriter { @Override public String translate(JdbcResultRow rs, int column) throws SQLException, IOException { return toString(rs.getFieldValue(column)); } StringColumnTranslator(); }
StringColumnTranslator extends FormattableColumnTranslator implements ColumnWriter { @Override public String translate(JdbcResultRow rs, int column) throws SQLException, IOException { return toString(rs.getFieldValue(column)); } StringColumnTranslator(); @Override String translate(JdbcResultRow rs, int column); @Override String translate(JdbcResultRow rs, String columnName); @Override void write(JdbcResultRow rs, int column, OutputStream out); @Override void write(JdbcResultRow rs, String columnName, OutputStream out); }
StringColumnTranslator extends FormattableColumnTranslator implements ColumnWriter { @Override public String translate(JdbcResultRow rs, int column) throws SQLException, IOException { return toString(rs.getFieldValue(column)); } StringColumnTranslator(); @Override String translate(JdbcResultRow rs, int column); @Override String translate(JdbcResultRow rs, String columnName); @Override void write(JdbcResultRow rs, int column, OutputStream out); @Override void write(JdbcResultRow rs, String columnName, OutputStream out);  }