public class JdbcDatabaseManager
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
JdbcDatabaseManager.EmbeddedJdbcDatabase
Extends
JdbcDatabaseManager.JdbcDatabase with additional defaults for the use of embedded databases such as H2. |
static class |
JdbcDatabaseManager.JdbcDatabase
Provides the required information in order to connect toa JDBC database, including the necessary driver and
validation query.
|
Constructor and Description |
---|
JdbcDatabaseManager() |
Modifier and Type | Method and Description |
---|---|
static java.util.Optional<JdbcDatabaseManager.JdbcDatabase> |
findDatabase(java.lang.String jdbcUrl)
Searches defined database where the URL prefix matches one of the prefixes defined in a
JdbcDatabaseManager.JdbcDatabase . |
static java.util.Optional<JdbcDatabaseManager.EmbeddedJdbcDatabase> |
get(java.lang.ClassLoader classLoader)
Searches the provided classloader for an embedded database driver.
|
static boolean |
isEmbedded(java.lang.String driverClassName)
Searches embedded databases where the driver matches the argument.
|
public static java.util.Optional<JdbcDatabaseManager.JdbcDatabase> findDatabase(java.lang.String jdbcUrl)
JdbcDatabaseManager.JdbcDatabase
.
The prefix is determined by:
jdbc:
jdbcUrl
- The connection URLJdbcDatabaseManager.JdbcDatabase
public static java.util.Optional<JdbcDatabaseManager.EmbeddedJdbcDatabase> get(java.lang.ClassLoader classLoader)
classLoader
- The classloader to searchJdbcDatabaseManager.EmbeddedJdbcDatabase
public static boolean isEmbedded(java.lang.String driverClassName)
driverClassName
- The driver class name to search on