use of org.springframework.jdbc.core.SqlProvider in project buffer-slayer by tramchamploo.
the class BatchJdbcTemplate method update.
public MessageFuture<Integer> update(PreparedStatementCreator psc) throws DataAccessException {
if (psc instanceof SqlProvider) {
SqlProvider sqlProvider = (SqlProvider) psc;
String sql = sqlProvider.getSql();
Builder builder = Sql.builder().sql(sql);
if (psc instanceof PreparedStatementSetter) {
PreparedStatementSetter pss = (PreparedStatementSetter) psc;
builder.preparedStatementSetter(pss);
}
return reporter.report(builder.build());
}
throw new UnsupportedOperationException("Must be instance of SqlProvider");
}
Aggregations