public enum DatabaseType extends Enum<DatabaseType>
| Enum Constant and Description |
|---|
DB2 |
H2 |
MARIADB |
MSSQL |
MYSQL |
ORACLE |
POSTGRESPLUS |
POSTGRESQL |
SYBASE |
UNKNOWN |
| Modifier and Type | Method and Description |
|---|---|
static DatabaseType |
estimateType(String jdbcUrl)
Based on the provided JDBC URL string it tries to return
appropriate database type.
|
String |
hibernateDialect() |
String |
jdbcDriverClass() |
String |
jdbcUrlPattern()
Format to take is:
MessageFormat.format(DatabaseType.jdbcUrlPattern(), host, port, dbName) |
String |
port() |
static DatabaseType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static DatabaseType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DatabaseType POSTGRESQL
public static final DatabaseType MYSQL
public static final DatabaseType ORACLE
public static final DatabaseType DB2
public static final DatabaseType MARIADB
public static final DatabaseType SYBASE
public static final DatabaseType MSSQL
public static final DatabaseType POSTGRESPLUS
public static final DatabaseType H2
public static final DatabaseType UNKNOWN
public static DatabaseType[] values()
for (DatabaseType c : DatabaseType.values()) System.out.println(c);
public static DatabaseType 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 hibernateDialect()
public String port()
public String jdbcDriverClass()
public String jdbcUrlPattern()
MessageFormat.format(DatabaseType.jdbcUrlPattern(), host, port, dbName)public static DatabaseType estimateType(String jdbcUrl)
jdbcUrl - jdbc url that will be verified if it matches particular database typeUNKNOWN is returned.Copyright © 2019. All rights reserved.