SQLResultSet implements IPentahoResultSet, IPeekable { public Object[] getDataColumn( final int column ) { Object[] result = null; result = new Object[getRowCount()]; for ( int row = 0; row < result.length; row++ ) { result[row] = getValueAt( row, column ); } return result; } SQLResultSet( final ResultSet nativeResultSet, final SQLConnection nativeConnection ); void setMetaData( final IPentahoMetaData metadata ); IPentahoMetaData getMetaData(); Object[] peek(); Object[] next(); void closeConnection(); void close(); void dispose(); boolean isScrollable(); int getColumnCount(); int getRowCount(); Object getValueAt( final int row, final int column ); IPentahoResultSet memoryCopy(); void beforeFirst(); Object[] getDataColumn( final int column ); Object[] getDataRow( final int row );  }
@Test public void testGetDataColumn() throws SQLException { Object value = "testObject"; int rowCount = 1; when( nativeResultSet.getObject( anyInt() ) ).thenReturn( value ); when( nativeResultSet.getRow() ).thenReturn( rowCount ); when( nativeResultSet.last() ).thenReturn( true ); SQLResultSet resultSet = new SQLResultSet( nativeResultSet, nativeConnection ); assertEquals( value, resultSet.getDataColumn( 0 )[0] ); }