Interface JdbcDrivers
-
- All Known Implementing Classes:
JdbcDriversProxy
,TeamCityJdbcDrivers
public interface JdbcDrivers
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Driver
findDefaultDriver(DatabaseType dbType)
Provides with the default driver for the specified database type.Driver
findDriver(String connectionString)
Looks for a situable driver (one that accepts the given url, seeDriver.acceptsURL(String)
).ClassLoader
getClassLoader()
Driver
getDriver(String connectionString)
Looks for a situable driver (one that accepts the given url, seeDriver.acceptsURL(String)
).Driver
getDriver(String connectionString, String className)
File
getDriverLocation(Driver driver)
Returns location of jar file containing specified JDBC driver.void
unregisterAll()
-
-
-
Method Detail
-
getClassLoader
@NotNull ClassLoader getClassLoader()
-
findDefaultDriver
@Nullable Driver findDefaultDriver(@NotNull DatabaseType dbType)
Provides with the default driver for the specified database type.- Parameters:
dbType
- type of the database.- Returns:
- the driver, or null if no applicable drivers.
-
findDriver
@Nullable Driver findDriver(@NotNull String connectionString) throws NoSuitableJdbcDrivers
Looks for a situable driver (one that accepts the given url, seeDriver.acceptsURL(String)
).- Parameters:
connectionString
- url to check for.- Returns:
- found suitable driver, or null if not found.
- Throws:
NoSuitableJdbcDrivers
-
getDriver
@NotNull Driver getDriver(@NotNull String connectionString) throws NoSuitableJdbcDrivers
Looks for a situable driver (one that accepts the given url, seeDriver.acceptsURL(String)
). Or raises an exception if no suitable drivers.- Parameters:
connectionString
- url to check for.- Returns:
- found suitable driver.
- Throws:
NoSuitableJdbcDrivers
- when no suitable JDBC drivers found.
-
getDriver
@NotNull Driver getDriver(@NotNull String connectionString, @NotNull String className) throws NoSuitableJdbcDrivers
- Throws:
NoSuitableJdbcDrivers
-
unregisterAll
void unregisterAll()
-
-