private XInitialization getUnititializedObj(TestParameters Param){
// creating an object wihch ist not initialized
// get a model of a DataSource
Object oDBC = null;
XMultiServiceFactory xMSF;
try {
xMSF = (XMultiServiceFactory)Param.getMSF();
oDBC = xMSF.createInstance( "com.sun.star.sdb.DatabaseContext" );
}
catch( com.sun.star.uno.Exception e ) {
throw new StatusException("Could not instantiate DatabaseContext", e) ;
}
Object oDataSource = null;
try{
XNameAccess xNA = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, oDBC);
oDataSource = xNA.getByName(sDataSourceName);
} catch ( com.sun.star.container.NoSuchElementException e){
throw new StatusException("could not get '" + sDataSourceName + "'" , e) ;
} catch ( com.sun.star.lang.WrappedTargetException e){
throw new StatusException("could not get '" + sDataSourceName + "'" , e) ;
}
XDocumentDataSource xDDS = (XDocumentDataSource) UnoRuntime.queryInterface(XDocumentDataSource.class, oDataSource);
XModel xMod = (XModel) UnoRuntime.queryInterface(XModel.class, xDDS.getDatabaseDocument ());
// get an intaces of QueryDesign
Object oQueryDesign = null;
try{
oQueryDesign = xMSF.createInstance("com.sun.star.sdb.QueryDesign");
}catch( com.sun.star.uno.Exception e ) {
throw new StatusException("Could not instantiate QueryDesign", e) ;
}
XController xCont = (XController) UnoRuntime.queryInterface(XController.class, oQueryDesign);