Enum Class DatabaseType
- All Implemented Interfaces:
Serializable
,Comparable<DatabaseType>
,Constable
An enum that we can use in JAG to track which database we're connected with
-
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 TypeMethodDescriptionint
int
boolean
isFamilyOf
(DatabaseFamily family) boolean
matchesIdentifierAndMajorVersionAndMinorVersion
(String databaseTypeName, int majorVersion, int minorVersion) Checks whether the database type matches the given database identifier and major version.static DatabaseType
Returns the enum constant of this class with the specified name.static DatabaseType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
HSQL
-
H2
-
MYSQL
-
POSTGRESQL_8
-
POSTGRESQL_9_0
-
POSTGRESQL
-
ORACLE_10g
-
ORACLE
-
MS_SQL2005
-
MS_SQL
-
-
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
-
getIdentifier
-
getMajorVersion
public int getMajorVersion() -
getMinorVersion
public int getMinorVersion() -
getFamily
-
isFamilyOf
-
matchesIdentifierAndMajorVersionAndMinorVersion
public boolean matchesIdentifierAndMajorVersionAndMinorVersion(String databaseTypeName, int majorVersion, int minorVersion) Checks whether the database type matches the given database identifier and major version. if the database type has a major version of 0, only the identifier has to match.- Parameters:
databaseTypeName
- the database namemajorVersion
- the major versionminorVersion
- the minor version- Returns:
- true if it is supported , false if not
-