/** * 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); }
@Before public void setup() throws Exception { resultSet = mock(ResultSet.class); rowSet = new ResultSetWrappingSqlRowSet(resultSet); }
/** * 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); }
/** * 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); }