@Override public boolean execute(String cql, @Nullable PreparedStatementBinder psb) throws DataAccessException { // noinspection ConstantConditions return query(newPreparedStatementCreator(cql), psb, ResultSet::wasApplied); }
@Nullable @Override public <T> T execute(String cql, PreparedStatementCallback<T> action) throws DataAccessException { return execute(newPreparedStatementCreator(cql), action); }
@Override public <T> T query(String cql, @Nullable PreparedStatementBinder psb, ResultSetExtractor<T> resultSetExtractor) throws DataAccessException { return query(newPreparedStatementCreator(cql), psb, resultSetExtractor); }
@Override public <T> List<T> query(String cql, @Nullable PreparedStatementBinder psb, RowMapper<T> rowMapper) throws DataAccessException { // noinspection ConstantConditions return query(newPreparedStatementCreator(cql), psb, newResultSetExtractor(rowMapper)); }
@Override public void query(String cql, @Nullable PreparedStatementBinder psb, RowCallbackHandler rowCallbackHandler) throws DataAccessException { query(newPreparedStatementCreator(cql), psb, newResultSetExtractor(rowCallbackHandler)); }
@Override public ResultSet queryForResultSet(String cql, Object... args) throws DataAccessException { // noinspection ConstantConditions return query(newPreparedStatementCreator(cql), newPreparedStatementBinder(args), rs -> rs); }
@Override public <T> T query(String cql, ResultSetExtractor<T> resultSetExtractor, Object... args) throws DataAccessException { return query(newPreparedStatementCreator(cql), newPreparedStatementBinder(args), resultSetExtractor); }
@Override public void query(String cql, RowCallbackHandler rowCallbackHandler, Object... args) throws DataAccessException { query(newPreparedStatementCreator(cql), newPreparedStatementBinder(args), newResultSetExtractor(rowCallbackHandler)); }
@Override public <T> List<T> query(String cql, RowMapper<T> rowMapper, Object... args) throws DataAccessException { // noinspection ConstantConditions return query(newPreparedStatementCreator(cql), newPreparedStatementBinder(args), newResultSetExtractor(rowMapper)); }
@Override public List<Map<String, Object>> queryForList(String cql, Object... args) throws DataAccessException { // noinspection ConstantConditions return query(newPreparedStatementCreator(cql), newPreparedStatementBinder(args), newResultSetExtractor(newColumnMapRowMapper())); }
@Override public <T> List<T> queryForList(String cql, Class<T> elementType, Object... args) throws DataAccessException { // noinspection ConstantConditions return query(newPreparedStatementCreator(cql), newPreparedStatementBinder(args), newResultSetExtractor(newSingleColumnRowMapper(elementType))); }
@Override public <T> T queryForObject(String cql, RowMapper<T> rowMapper, Object... args) throws DataAccessException { return DataAccessUtils.requiredSingleResult( query(newPreparedStatementCreator(cql), newPreparedStatementBinder(args), newResultSetExtractor(rowMapper, 1))); }