@Override public SqlRowSet queryForRowSet(String sql) throws DataAccessException { return result(query(sql, new SqlRowSetResultSetExtractor())); }
@Override public SqlRowSet extractData(ResultSet rs) throws SQLException { return createSqlRowSet(rs); }
/** * Create a {@link SqlRowSet} that wraps the given {@link ResultSet}, * representing its data in a disconnected fashion. * <p>This implementation creates a Spring {@link ResultSetWrappingSqlRowSet} * instance that wraps a standard JDBC {@link CachedRowSet} instance. * Can be overridden to use a different implementation. * @param rs the original ResultSet (connected) * @return the disconnected SqlRowSet * @throws SQLException if thrown by JDBC methods * @see #newCachedRowSet() * @see org.springframework.jdbc.support.rowset.ResultSetWrappingSqlRowSet */ protected SqlRowSet createSqlRowSet(ResultSet rs) throws SQLException { CachedRowSet rowSet = newCachedRowSet(); rowSet.populate(rs); return new ResultSetWrappingSqlRowSet(rowSet); }
@Override public SqlRowSet queryForRowSet(String sql, Object[] args, int[] argTypes) throws DataAccessException { return result(query(sql, args, argTypes, new SqlRowSetResultSetExtractor())); }
public SqlRowSet extractData(ResultSet rs) throws SQLException { return createSqlRowSet(rs); }
/** * Create a SqlRowSet that wraps the given ResultSet, * representing its data in a disconnected fashion. * <p>This implementation creates a Spring ResultSetWrappingSqlRowSet * instance that wraps a standard JDBC CachedRowSet instance. * Can be overridden to use a different implementation. * @param rs the original ResultSet (connected) * @return the disconnected SqlRowSet * @throws SQLException if thrown by JDBC methods * @see #newCachedRowSet * @see org.springframework.jdbc.support.rowset.ResultSetWrappingSqlRowSet */ protected SqlRowSet createSqlRowSet(ResultSet rs) throws SQLException { CachedRowSet rowSet = newCachedRowSet(); rowSet.populate(rs); return new ResultSetWrappingSqlRowSet(rowSet); }
@Override public SqlRowSet queryForRowSet(String sql, @Nullable Object... args) throws DataAccessException { return result(query(sql, args, new SqlRowSetResultSetExtractor())); }
return createSqlRowSet(rs);
/** * Create a {@link SqlRowSet} that wraps the given {@link ResultSet}, * representing its data in a disconnected fashion. * <p>This implementation creates a Spring {@link ResultSetWrappingSqlRowSet} * instance that wraps a standard JDBC {@link CachedRowSet} instance. * Can be overridden to use a different implementation. * @param rs the original ResultSet (connected) * @return the disconnected SqlRowSet * @throws SQLException if thrown by JDBC methods * @see #newCachedRowSet() * @see org.springframework.jdbc.support.rowset.ResultSetWrappingSqlRowSet */ protected SqlRowSet createSqlRowSet(ResultSet rs) throws SQLException { CachedRowSet rowSet = newCachedRowSet(); rowSet.populate(rs); return new ResultSetWrappingSqlRowSet(rowSet); }
@Override public SqlRowSet queryForRowSet(String sql, SqlParameterSource paramSource) throws DataAccessException { SqlRowSet result = getJdbcOperations().query( getPreparedStatementCreator(sql, paramSource), new SqlRowSetResultSetExtractor()); Assert.state(result != null, "No result"); return result; }
public SqlRowSet queryForRowSet(String sql, Object[] args, int[] argTypes) throws DataAccessException { return query(sql, args, argTypes, new SqlRowSetResultSetExtractor()); }
public SqlRowSet queryForRowSet(String sql, Object... args) throws DataAccessException { return query(sql, args, new SqlRowSetResultSetExtractor()); }
public SqlRowSet queryForRowSet(String sql) throws DataAccessException { return query(sql, new SqlRowSetResultSetExtractor()); }
@Override public SqlRowSet queryForSqlRowSet(String sql, DataSource dataSource, Context context) throws SQLException { JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource); return jdbcTemplate.query( getPreparedStatementCreator(sql, dataSource, context,new GetGeneratedKeys()), new SqlRowSetResultSetExtractor()); }
public SqlRowSet getSqlRowSet(String sql) throws TinyDbException { try { operatorDebugLogNoParam(sql); return (SqlRowSet) jdbcTemplate.query(sql, new SqlRowSetResultSetExtractor()); } catch (DataAccessException e) { operatorErrorLogNoParam(sql, e); throw new TinyDbException(e.getRootCause()); } }
public SqlRowSet getSqlRowSet(String sql, Object... parameters) throws TinyDbException { try { operatorDebugLog(sql, parameters); return (SqlRowSet) jdbcTemplate.query(sql, parameters, new SqlRowSetResultSetExtractor()); } catch (DataAccessException e) { operatorErrorLog(sql, e, parameters); throw new TinyDbException(e.getRootCause()); } }
public SqlRowSet queryForRowSet(String sql, SqlParameterSource paramSource) throws DataAccessException { return getJdbcOperations().query( getPreparedStatementCreator(sql, paramSource), new SqlRowSetResultSetExtractor()); }
public SqlRowSet getSqlRowSet(String sql, Map<String, Object> parameters) throws TinyDbException { StringBuffer buf = new StringBuffer(); List<Object> paramList = getParamArray(sql, parameters, buf); Object[] params = checkNullParamList(paramList); String tempSql = buf.toString(); try { operatorDebugLog(tempSql, params); return (SqlRowSet) jdbcTemplate.query(tempSql, params, new SqlRowSetResultSetExtractor()); } catch (DataAccessException e) { operatorErrorLog(tempSql, e, params); throw new TinyDbException(e.getRootCause()); } }
public SqlRowSet getSqlRowSet(String sql, List<Object> parameters) throws TinyDbException { Object[] params = checkNullParamList(parameters); try { operatorDebugLog(sql, params); return (SqlRowSet) jdbcTemplate.query(sql, params, new SqlRowSetResultSetExtractor()); } catch (DataAccessException e) { operatorErrorLog(sql, e, params); throw new TinyDbException(e.getRootCause()); } }
public SqlRowSet queryForRowSet(String sql, SqlParameterSource paramSource) throws DataAccessException { SqlRowSet result = getJdbcOperations().query( getPreparedStatementCreator(sql, paramSource), new SqlRowSetResultSetExtractor()); Assert.state(result != null, "No result"); return result;