@Test public void testGetDriverLegacy() { IDatabaseDialect dialect = mock( IDatabaseDialect.class ); assertEquals( JDBCDriver.class, PooledDatasourceHelper.getDriver( dialect, JDBCDriver.class.getCanonicalName(), null ).getClass() ); }
static Driver getDriver( IDatabaseDialect dialect, String driverClass, String url ) { if ( dialect instanceof IDriverLocator ) { return ( (IDriverLocator) dialect ).getDriver( url ); } else { return ObjectUtilities.loadAndInstantiate( driverClass, PooledDatasourceHelper.class, Driver.class ); } }
PooledDatasourceHelper { static Driver getDriver( IDatabaseDialect dialect, String driverClass, String url ) { if ( dialect instanceof IDriverLocator ) { return ( (IDriverLocator) dialect ).getDriver( url ); } else { return ObjectUtilities.loadAndInstantiate( driverClass, PooledDatasourceHelper.class, Driver.class ); } } }
PooledDatasourceHelper { static Driver getDriver( IDatabaseDialect dialect, String driverClass, String url ) { if ( dialect instanceof IDriverLocator ) { return ( (IDriverLocator) dialect ).getDriver( url ); } else { return ObjectUtilities.loadAndInstantiate( driverClass, PooledDatasourceHelper.class, Driver.class ); } } private  PooledDatasourceHelper(); }
PooledDatasourceHelper { static Driver getDriver( IDatabaseDialect dialect, String driverClass, String url ) { if ( dialect instanceof IDriverLocator ) { return ( (IDriverLocator) dialect ).getDriver( url ); } else { return ObjectUtilities.loadAndInstantiate( driverClass, PooledDatasourceHelper.class, Driver.class ); } } private  PooledDatasourceHelper(); static PoolingDataSource setupPooledDataSource( final IDatabaseConnection databaseConnection ); }
PooledDatasourceHelper { static Driver getDriver( IDatabaseDialect dialect, String driverClass, String url ) { if ( dialect instanceof IDriverLocator ) { return ( (IDriverLocator) dialect ).getDriver( url ); } else { return ObjectUtilities.loadAndInstantiate( driverClass, PooledDatasourceHelper.class, Driver.class ); } } private  PooledDatasourceHelper(); static PoolingDataSource setupPooledDataSource( final IDatabaseConnection databaseConnection ); static final String GENERIC; }