@Test public void shouldGetTextFromCoordinate() { DNCWorkCoordinate coordinate = new DNCWorkCoordinate().idInSourceTable(1L).pkColumnName("ID") .sourceTable("TestTable1").sourceColumn("textColumn"); dao.executeSQLQueryForSource("alter table TestTable1 add textColumn varchar(100)"); dao.executeSQLQueryForSource("insert into TestTable1 values(1, '', 'text from coordinate')"); String textFromCoordinate = dao.getTextFromCoordinate(coordinate); assertThat(textFromCoordinate, equalTo("text from coordinate")); }
public String getTextFromCoordinate(DNCWorkCoordinate coordinate) { if (coordinate.isBinary()) { throw new IllegalArgumentException("Coordinate is not a text coordinate. It's a binary one."); } Object result = getObjectFromCoordinate(coordinate); return clobHelper.getStringFromExpectedClob(result); }
DNCWorkUnitDao extends BaseDao { public String getTextFromCoordinate(DNCWorkCoordinate coordinate) { if (coordinate.isBinary()) { throw new IllegalArgumentException("Coordinate is not a text coordinate. It's a binary one."); } Object result = getObjectFromCoordinate(coordinate); return clobHelper.getStringFromExpectedClob(result); } }
DNCWorkUnitDao extends BaseDao { public String getTextFromCoordinate(DNCWorkCoordinate coordinate) { if (coordinate.isBinary()) { throw new IllegalArgumentException("Coordinate is not a text coordinate. It's a binary one."); } Object result = getObjectFromCoordinate(coordinate); return clobHelper.getStringFromExpectedClob(result); }  }
DNCWorkUnitDao extends BaseDao { public String getTextFromCoordinate(DNCWorkCoordinate coordinate) { if (coordinate.isBinary()) { throw new IllegalArgumentException("Coordinate is not a text coordinate. It's a binary one."); } Object result = getObjectFromCoordinate(coordinate); return clobHelper.getStringFromExpectedClob(result); }  String getTextFromCoordinate(DNCWorkCoordinate coordinate); byte[] getByteFromCoordinate(DNCWorkCoordinate coordinate); void saveConvertedText(DNCWorkCoordinate coordinate, String processedText); }
DNCWorkUnitDao extends BaseDao { public String getTextFromCoordinate(DNCWorkCoordinate coordinate) { if (coordinate.isBinary()) { throw new IllegalArgumentException("Coordinate is not a text coordinate. It's a binary one."); } Object result = getObjectFromCoordinate(coordinate); return clobHelper.getStringFromExpectedClob(result); }  String getTextFromCoordinate(DNCWorkCoordinate coordinate); byte[] getByteFromCoordinate(DNCWorkCoordinate coordinate); void saveConvertedText(DNCWorkCoordinate coordinate, String processedText);  }