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 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()
-
-
-
Constructor Detail
-
JdbcDriversProxy
public JdbcDriversProxy(@NotNull JdbcDrivers realDrivers)
-
-
Method Detail
-
getClassLoader
@NotNull public ClassLoader getClassLoader()
- Specified by:
getClassLoader
in interfaceJdbcDrivers
-
findDefaultDriver
@Nullable public Driver findDefaultDriver(@NotNull DatabaseType dbType) throws NoSuitableJdbcDrivers
Description copied from interface:JdbcDrivers
Provides with the default driver for the specified database type.- Specified by:
findDefaultDriver
in 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:JdbcDrivers
Looks for a situable driver (one that accepts the given url, seeDriver.acceptsURL(String)
).- Specified by:
findDriver
in 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:JdbcDrivers
Looks for a situable driver (one that accepts the given url, seeDriver.acceptsURL(String)
). Or raises an exception if no suitable drivers.- Specified by:
getDriver
in 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:
getDriver
in interfaceJdbcDrivers
- Throws:
NoSuitableJdbcDrivers
-
unregisterAll
public void unregisterAll()
- Specified by:
unregisterAll
in interfaceJdbcDrivers
-
getDriverLocation
@Nullable public File getDriverLocation(@NotNull Driver driver)
Description copied from interface:JdbcDrivers
Returns location of jar file containing specified JDBC driver.- Specified by:
getDriverLocation
in interfaceJdbcDrivers
- Returns:
- location of jar file on disk, or null if location cannot be determined for some reason.
-
-