com.atlassian.greenhopper.util.database
Enum DatabaseType
java.lang.Object
java.lang.Enum<DatabaseType>
com.atlassian.greenhopper.util.database.DatabaseType
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable<DatabaseType>
public enum DatabaseType
- extends java.lang.Enum<DatabaseType>
An enum that we can use in JAG to track which database we're connected with
Method Summary |
java.lang.String |
getIdentifier()
|
int |
getMajorVersion()
|
boolean |
matchesIdentifierAndMajorVersion(java.lang.String databaseTypeName,
int majorVersion)
Checks whether the database type matches the given database identifier and major version. |
static DatabaseType |
valueOf(java.lang.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. |
Methods inherited from class java.lang.Enum |
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
HSQL
public static final DatabaseType HSQL
MYSQL
public static final DatabaseType MYSQL
POSTGRESQL
public static final DatabaseType POSTGRESQL
ORACLE_10g
public static final DatabaseType ORACLE_10g
ORACLE
public static final DatabaseType ORACLE
MS_SQL2005
public static final DatabaseType MS_SQL2005
MS_SQL
public static final DatabaseType MS_SQL
values
public static DatabaseType[] values()
- Returns an array containing the constants of this enum type, in
the order they are declared. This method may be used to iterate
over the constants as follows:
for (DatabaseType c : DatabaseType.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they are declared
valueOf
public static DatabaseType valueOf(java.lang.String name)
- Returns the enum constant of this type with the specified name.
The string must match exactly an identifier used to declare an
enum constant in this type. (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:
java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified name
java.lang.NullPointerException
- if the argument is null
getIdentifier
public java.lang.String getIdentifier()
getMajorVersion
public int getMajorVersion()
matchesIdentifierAndMajorVersion
public boolean matchesIdentifierAndMajorVersion(java.lang.String databaseTypeName,
int majorVersion)
- 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
- majorVersion
-
- Returns:
Copyright © 2007-2014 Atlassian. All Rights Reserved.