// let's fill in a parameter value via XParameters, and see whether it is respected by the parameters container
XParameters rowsetParams = (XParameters)UnoRuntime.queryInterface( XParameters.class,
m_rowSet );
rowsetParams.setString( 1, "Apples" );
XIndexAccess params = m_paramsSupplier.getParameters();
XPropertySet firstParam = (XPropertySet)UnoRuntime.queryInterface( XPropertySet.class, params.getByIndex(0) );
Object firstParamValue = firstParam.getPropertyValue( "Value" );
assure( "XParameters and the parameters container do not properly interact",
firstParamValue.equals( "Apples" ) );
// let's see whether this also survices an execute of the row set
rowsetParams.setString( 1, "Oranges" );
m_rowSet.execute();
{
// TODO: the following would not be necessary if the parameters container would *survive*
// the execution of the row set. It currently doesn't (though the values it represents do).
// It would be nice, but not strictly necessary, if it would.
params = m_paramsSupplier.getParameters();
firstParam = (XPropertySet)UnoRuntime.queryInterface( XPropertySet.class, params.getByIndex(0) );
}
firstParamValue = firstParam.getPropertyValue( "Value" );
assure( "XParameters and the parameters container do not properly interact, after the row set has been executed",
firstParamValue.equals( "Oranges" ) );
}