Package org.jivesoftware.database
Enum DbConnectionManager.DatabaseType
- java.lang.Object
-
- java.lang.Enum<DbConnectionManager.DatabaseType>
-
- org.jivesoftware.database.DbConnectionManager.DatabaseType
-
- All Implemented Interfaces:
Serializable
,Comparable<DbConnectionManager.DatabaseType>
- Enclosing class:
- DbConnectionManager
public static enum DbConnectionManager.DatabaseType extends Enum<DbConnectionManager.DatabaseType>
A class that identifies the type of the database that Jive is connected to. In most cases, we don't want to make any database specific calls and have no need to know the type of database we're using. However, there are certain cases where it's critical to know the database for performance reasons.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
escapeIdentifier(String keyword)
static DbConnectionManager.DatabaseType
valueOf(String name)
Returns the enum constant of this type with the specified name.static DbConnectionManager.DatabaseType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
oracle
public static final DbConnectionManager.DatabaseType oracle
-
postgresql
public static final DbConnectionManager.DatabaseType postgresql
-
mysql
public static final DbConnectionManager.DatabaseType mysql
-
hsqldb
public static final DbConnectionManager.DatabaseType hsqldb
-
db2
public static final DbConnectionManager.DatabaseType db2
-
sqlserver
public static final DbConnectionManager.DatabaseType sqlserver
-
interbase
public static final DbConnectionManager.DatabaseType interbase
-
unknown
public static final DbConnectionManager.DatabaseType unknown
-
-
Method Detail
-
values
public static DbConnectionManager.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 (DbConnectionManager.DatabaseType c : DbConnectionManager.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 DbConnectionManager.DatabaseType valueOf(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:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
-