Package org.springframework.boot.jdbc
Enum Class EmbeddedDatabaseConnection
- All Implemented Interfaces:
- Serializable,- Comparable<EmbeddedDatabaseConnection>,- Constable
Connection details for 
embedded databases.- Since:
- 1.0.0
- Author:
- Phillip Webb, Dave Syer, Stephane Nicoll, Nidhi Desai, Moritz Halbritter
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from class java.lang.EnumEnum.EnumDesc<E extends Enum<E>>
- 
Enum Constant SummaryEnum Constants
- 
Method SummaryModifier and TypeMethodDescriptionstatic EmbeddedDatabaseConnectionget(ClassLoader classLoader) Returns the most suitableEmbeddedDatabaseConnectionfor the given class loader.Returns the driver class name.getType()Returns theEmbeddedDatabaseTypefor the connection.Returns the URL for the connection using the specifieddatabaseName.static booleanisEmbedded(String driverClass, String url) Convenience method to determine if a given driver class name and url represent an embedded database type.static booleanisEmbedded(DataSource dataSource) Convenience method to determine if a given data source represents an embedded database type.static EmbeddedDatabaseConnectionReturns the enum constant of this class with the specified name.static EmbeddedDatabaseConnection[]values()Returns an array containing the constants of this enum class, in the order they are declared.
- 
Enum Constant Details- 
NONENo Connection.
- 
H2H2 Database Connection.
- 
DERBYDerby Database Connection.
- 
HSQLDBHSQL Database Connection.- Since:
- 2.4.0
 
 
- 
- 
Method Details- 
valuesReturns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
 
- 
valueOfReturns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
- name- the name of the enum constant to be returned.
- Returns:
- the enum constant with the specified name
- Throws:
- IllegalArgumentException- if this enum class has no constant with the specified name
- NullPointerException- if the argument is null
 
- 
getDriverClassNameReturns the driver class name.- Returns:
- the driver class name
 
- 
getTypeReturns theEmbeddedDatabaseTypefor the connection.- Returns:
- the database type
 
- 
getUrlReturns the URL for the connection using the specifieddatabaseName.- Parameters:
- databaseName- the name of the database
- Returns:
- the connection URL
 
- 
isEmbeddedConvenience method to determine if a given driver class name and url represent an embedded database type.- Parameters:
- driverClass- the driver class
- url- the jdbc url (can be- null)
- Returns:
- true if the driver class and url refer to an embedded database
- Since:
- 2.4.0
 
- 
isEmbeddedConvenience method to determine if a given data source represents an embedded database type.- Parameters:
- dataSource- the data source to interrogate
- Returns:
- true if the data source is one of the embedded types
 
- 
getReturns the most suitableEmbeddedDatabaseConnectionfor the given class loader.- Parameters:
- classLoader- the class loader used to check for classes
- Returns:
- an EmbeddedDatabaseConnectionorNONE.
 
 
-