XPropertySet query = (XPropertySet)UnoRuntime.queryInterface(
XPropertySet.class, queries.getByName( queryNames[i] ) );
XColumnsSupplier suppCols = (XColumnsSupplier)UnoRuntime.queryInterface(
XColumnsSupplier.class, query);
XIndexAccess columns = (XIndexAccess)UnoRuntime.queryInterface(
XIndexAccess.class, suppCols.getColumns());
// check whether the columns supplied by the query match what we expected
assure( "invalid column count (found " + columns.getCount() + ", expected: " + expectedColumnNames[i].length + ") for query \"" + queryNames[i] + "\"",
columns.getCount() == expectedColumnNames[i].length );
for ( int col = 0; col < columns.getCount(); ++col )
{
XNamed columnName = (XNamed)UnoRuntime.queryInterface(
XNamed.class, columns.getByIndex(col) );
assure( "column no. " + col + " of query \"" + queryNames[i] + "\" not matching",
columnName.getName().equals( expectedColumnNames[i][col] ) );
}
}
}