Package com.atlassian.jira.database
Enum Class DatabaseVendor
- All Implemented Interfaces:
Serializable
,Comparable<DatabaseVendor>
,Constable
An enum representing the supported database vendors that JIRA can connect to.
- Since:
- v7.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptiongetHumanReadableVersion
(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.0getVersion
(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 vendorsstatic DatabaseVendor
Returns the enum constant of this class with the specified name.static DatabaseVendor[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
POSTGRES
-
ORACLE
-
SQL_SERVER
-
H2
-
MY_SQL
-
UNSUPPORTED
-
FAKE_DATABASE_FOR_TESTING
-
-
Method Details
-
values
Returns 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
-
valueOf
Returns 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 nameNullPointerException
- if the argument is null
-
getHumanReadableName
-
getSQLServerVersionIfExists
Deprecated.since 8.3, to be removed in 9.0This is a public static delegate to private static method getSQLServerVersion(). It's there to satisfy API checker / backwards compatibility.- Parameters:
version
- The version as a String, e.g.: "10.50.1600.1".- Returns:
- marketing version name e.g "2008 R2"
-
getVersion
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- Parameters:
version
- The version string as retrieved from the DatabaseAccessor- Returns:
- release version
- Throws:
IllegalArgumentException
- in case of failure, message explains the reason
-
getHumanReadableVersion
Gets a release version of a database like getVersion() method, but does not throw in case of failure.- Parameters:
version
- The version string as retrieved from the DatabaseAccessor- Returns:
- release version or input version in case of failure
-