Revision 47456 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/test/java/org/gvsig/fmap/dal/store/jdbc2/AbstractTestUtils.java

View differences:

AbstractTestUtils.java
481 481
        return explorer;
482 482
    }
483 483

  
484
    public JDBCServerExplorer openServerExplorer(File dbfile) throws Exception {        
485
        DataManager dataManager = DALLocator.getDataManager();
486
        JDBCServerExplorerParameters params = this.getServerExplorerParameters(dbfile);
487
        JDBCServerExplorer explorer = (JDBCServerExplorer) dataManager.openServerExplorer(
488
                this.getProviderName(), 
489
                params
490
        );
491
        return explorer;
492
    }
493

  
484 494
    public void drop_tables(JDBCServerExplorer explorer, String...tables) throws Exception {
485 495
        for (String table : tables) {
486 496
            String sql = "DROP TABLE IF EXISTS \""+table+"\"";
......
559 569
        return extraColumn;
560 570
    }
561 571

  
572
    public JDBCServerExplorerParameters getServerExplorerParameters(File dbfile) throws Exception {
573
        DataManager dataManager = DALLocator.getDataManager();
574
        JDBCServerExplorerParameters conn = (JDBCServerExplorerParameters) dataManager.createServerExplorerParameters(this.getProviderName());
575
//        System.out.println("#### dbfile: " + dbfile.getAbsolutePath());
576
        FileUtils.forceMkdir(dbfile.getParentFile());
577
        ((HasAFile) conn).setFile(dbfile);
578
        return conn;
579
    }
562 580

  
563 581
}

Also available in: Unified diff