Class JdbcDriversProxy
- java.lang.Object
-
- jetbrains.buildServer.serverSide.db.JdbcDriversProxy
-
- All Implemented Interfaces:
JdbcDrivers
public class JdbcDriversProxy extends Object implements JdbcDrivers
-
-
Constructor Summary
Constructors Constructor Description JdbcDriversProxy(JdbcDrivers realDrivers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DriverfindDefaultDriver(DatabaseType dbType)Provides with the default driver for the specified database type.DriverfindDriver(String connectionString)Looks for a situable driver (one that accepts the given url, seeDriver.acceptsURL(String)).ClassLoadergetClassLoader()DrivergetDriver(String connectionString)Looks for a situable driver (one that accepts the given url, seeDriver.acceptsURL(String)).DrivergetDriver(String connectionString, String className)FilegetDriverLocation(Driver driver)Returns location of jar file containing specified JDBC driver.voidunregisterAll()
-
-
-
Constructor Detail
-
JdbcDriversProxy
public JdbcDriversProxy(@NotNull JdbcDrivers realDrivers)
-
-
Method Detail
-
getClassLoader
@NotNull public ClassLoader getClassLoader()
- Specified by:
getClassLoaderin interfaceJdbcDrivers
-
findDefaultDriver
@Nullable public Driver findDefaultDriver(@NotNull DatabaseType dbType) throws NoSuitableJdbcDrivers
Description copied from interface:JdbcDriversProvides with the default driver for the specified database type.- Specified by:
findDefaultDriverin interfaceJdbcDrivers- Parameters:
dbType- type of the database.- Returns:
- the driver, or null if no applicable drivers.
- Throws:
NoSuitableJdbcDrivers
-
findDriver
@Nullable public Driver findDriver(@NotNull String connectionString) throws NoSuitableJdbcDrivers
Description copied from interface:JdbcDriversLooks for a situable driver (one that accepts the given url, seeDriver.acceptsURL(String)).- Specified by:
findDriverin interfaceJdbcDrivers- Parameters:
connectionString- url to check for.- Returns:
- found suitable driver, or null if not found.
- Throws:
NoSuitableJdbcDrivers
-
getDriver
@NotNull public Driver getDriver(@NotNull String connectionString) throws NoSuitableJdbcDrivers
Description copied from interface:JdbcDriversLooks for a situable driver (one that accepts the given url, seeDriver.acceptsURL(String)). Or raises an exception if no suitable drivers.- Specified by:
getDriverin interfaceJdbcDrivers- Parameters:
connectionString- url to check for.- Returns:
- found suitable driver.
- Throws:
NoSuitableJdbcDrivers- when no suitable JDBC drivers found.
-
getDriver
@NotNull public Driver getDriver(@NotNull String connectionString, @NotNull String className) throws NoSuitableJdbcDrivers
- Specified by:
getDriverin interfaceJdbcDrivers- Throws:
NoSuitableJdbcDrivers
-
unregisterAll
public void unregisterAll()
- Specified by:
unregisterAllin interfaceJdbcDrivers
-
getDriverLocation
@Nullable public File getDriverLocation(@NotNull Driver driver)
Description copied from interface:JdbcDriversReturns location of jar file containing specified JDBC driver.- Specified by:
getDriverLocationin interfaceJdbcDrivers- Returns:
- location of jar file on disk, or null if location cannot be determined for some reason.
-
-