public enum DatabaseVendor extends Enum<DatabaseVendor>
Enum Constant and Description |
---|
FAKE_DATABASE_FOR_TESTING |
H2 |
MY_SQL |
ORACLE |
POSTGRES |
SQL_SERVER |
UNSUPPORTED |
Modifier and Type | Method and Description |
---|---|
String |
getHumanReadableName() |
String |
getHumanReadableVersion(String version)
Gets a release version of a database like getVersion() method, but does not throw in case of failure.
|
static String |
getSQLServerVersionIfExists(String version)
Deprecated.
since 8.3, to be removed in 9.0
|
String |
getVersion(String version)
Gets a release version of a database, i.e.:
- minor.minor (without micro/bugfix position)
or
- marketing name for a release
Note: this method is overridden for some vendors
|
static DatabaseVendor |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static DatabaseVendor[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DatabaseVendor POSTGRES
public static final DatabaseVendor ORACLE
public static final DatabaseVendor SQL_SERVER
public static final DatabaseVendor H2
public static final DatabaseVendor MY_SQL
public static final DatabaseVendor UNSUPPORTED
public static final DatabaseVendor FAKE_DATABASE_FOR_TESTING
public static DatabaseVendor[] values()
for (DatabaseVendor c : DatabaseVendor.values()) System.out.println(c);
public static DatabaseVendor 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 getHumanReadableName()
@Deprecated public static String getSQLServerVersionIfExists(String version)
version
- The version as a String, e.g.: "10.50.1600.1".public String getVersion(String version)
version
- The version string as retrieved from the DatabaseAccessorIllegalArgumentException
- in case of failure, message explains the reasonpublic String getHumanReadableVersion(String version)
version
- The version string as retrieved from the DatabaseAccessorCopyright © 2002-2024 Atlassian. All Rights Reserved.