public enum DatabaseEngineDriver extends Enum<DatabaseEngineDriver>
Enum Constant and Description |
---|
DB2
The DB2 vendor.
|
H2
The H2 Database vendor.
|
MYSQL
The MySQL vendor.
|
ORACLE
The Oracle vendor.
|
POSTGRES
The PostgreSQL vendor.
|
SQLSERVER
The SQLServer vendor.
|
Modifier and Type | Method and Description |
---|---|
abstract String |
connectionStringFor(String hostname,
String database)
Gets the JDBC connection string given the hostname and the database.
|
abstract String |
connectionStringFor(String hostname,
String database,
int port)
Gets the JDBC connection string given the hostname and the database.
|
int |
defaultPort()
Gets the default port for this vendor.
|
String |
driver()
Gets the driver.
|
String |
engine()
Gets the engine.
|
static DatabaseEngineDriver |
fromDriver(String driverClass)
Gets the
DatabaseEngineDriver given the driver class. |
static DatabaseEngineDriver |
fromEngine(String engine)
Gets the
DatabaseEngineDriver given the engine. |
String |
toString() |
static DatabaseEngineDriver |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static DatabaseEngineDriver[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DatabaseEngineDriver H2
public static final DatabaseEngineDriver POSTGRES
public static final DatabaseEngineDriver SQLSERVER
public static final DatabaseEngineDriver ORACLE
public static final DatabaseEngineDriver MYSQL
public static final DatabaseEngineDriver DB2
public static DatabaseEngineDriver[] values()
for (DatabaseEngineDriver c : DatabaseEngineDriver.values()) System.out.println(c);
public static DatabaseEngineDriver 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 static DatabaseEngineDriver fromEngine(String engine)
DatabaseEngineDriver
given the engine.engine
- The engine name.public static DatabaseEngineDriver fromDriver(String driverClass)
DatabaseEngineDriver
given the driver class.driverClass
- The driver class.public String toString()
toString
in class Enum<DatabaseEngineDriver>
public String engine()
DatabaseEngineDriver
.public String driver()
DatabaseEngineDriver
.public int defaultPort() throws UnsupportedOperationException
UnsupportedOperationException
- If the vendor is H2.public abstract String connectionStringFor(String hostname, String database)
hostname
- The hostname The hostname.database
- The database.public abstract String connectionStringFor(String hostname, String database, int port)
hostname
- The hostname The hostname.database
- The database.port
- The port.Copyright © 2014 Feedzai. All Rights Reserved.