public enum EmbeddedDatabaseConnection extends Enum<EmbeddedDatabaseConnection>
embedded databases
.get(ClassLoader)
Enum Constant and Description |
---|
DERBY
Derby Database Connection.
|
H2
H2 Database Connection.
|
HSQL
HSQL Database Connection.
|
NONE
No Connection.
|
Modifier and Type | Method and Description |
---|---|
static EmbeddedDatabaseConnection |
get(ClassLoader classLoader)
Returns the most suitable
EmbeddedDatabaseConnection for the given class
loader. |
String |
getDriverClassName()
Returns the driver class name.
|
EmbeddedDatabaseType |
getType()
Returns the
EmbeddedDatabaseType for the connection. |
String |
getUrl()
Returns the URL for the connection.
|
static boolean |
isEmbedded(String driverClass)
Convenience method to determine if a given driver class name represents an embedded
database type.
|
static EmbeddedDatabaseConnection |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static EmbeddedDatabaseConnection[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final EmbeddedDatabaseConnection NONE
public static final EmbeddedDatabaseConnection H2
public static final EmbeddedDatabaseConnection DERBY
public static final EmbeddedDatabaseConnection HSQL
public static EmbeddedDatabaseConnection[] values()
for (EmbeddedDatabaseConnection c : EmbeddedDatabaseConnection.values()) System.out.println(c);
public static EmbeddedDatabaseConnection valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant
with the specified nameNullPointerException
- if the argument is nullpublic String getDriverClassName()
public EmbeddedDatabaseType getType()
EmbeddedDatabaseType
for the connection.public String getUrl()
public static boolean isEmbedded(String driverClass)
driverClass
- the driver classpublic static EmbeddedDatabaseConnection get(ClassLoader classLoader)
EmbeddedDatabaseConnection
for the given class
loader.classLoader
- the class loader used to check for classesEmbeddedDatabaseConnection
or NONE
.Copyright © 2014 Pivotal Software, Inc.. All rights reserved.