Package org.jivesoftware.database
Enum Class DbConnectionManager.DatabaseType
java.lang.Object
java.lang.Enum<DbConnectionManager.DatabaseType>
org.jivesoftware.database.DbConnectionManager.DatabaseType
- All Implemented Interfaces:
Serializable,Comparable<DbConnectionManager.DatabaseType>,Constable
- Enclosing class:
- DbConnectionManager
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionescapeIdentifier(String keyword) Returns the keyword or keyword phrase that should be used to limit result sets for this database type.booleanIndicates if the result-set limit keyword is used before the column list in a SELECT statement.Returns the enum constant of this class with the specified name.static DbConnectionManager.DatabaseType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
oracle
-
postgresql
-
mysql
-
hsqldb
-
db2
-
sqlserver
-
interbase
-
unknown
-
-
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
-
escapeIdentifier
-
getResultSetLimitKeyword
Returns the keyword or keyword phrase that should be used to limit result sets for this database type.- Returns:
- the result-set limit keyword, or a sensible default when the database type is unknown.
- See Also:
-
isResultSetLimitKeywordPrefix
public boolean isResultSetLimitKeywordPrefix()Indicates if the result-set limit keyword is used before the column list in a SELECT statement.- Returns:
truewhen the keyword is prefix-style (for exampleTOP), otherwisefalse.- See Also:
-