Package ru.curs.celesta
Enum DBType
- java.lang.Object
-
- java.lang.Enum<DBType>
-
- ru.curs.celesta.DBType
-
- All Implemented Interfaces:
Serializable
,Comparable<DBType>
public enum DBType extends Enum<DBType>
DB type.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DBType
getByNameIgnoreCase(String name)
Returns DB type by its name ignoring case.static DBType
resolveByJdbcUrl(String url)
Resolves DB type from JDBC URL string.static DBType
valueOf(String name)
Returns the enum constant of this type with the specified name.static DBType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
POSTGRESQL
public static final DBType POSTGRESQL
Postgre.
-
MSSQL
public static final DBType MSSQL
MS SQL.
-
ORACLE
public static final DBType ORACLE
ORACLE.
-
FIREBIRD
public static final DBType FIREBIRD
FIREBIRD.
-
H2
public static final DBType H2
H2.
-
UNKNOWN
public static final DBType UNKNOWN
Unknown type.
-
-
Method Detail
-
values
public static DBType[] 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 (DBType c : DBType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DBType 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
-
resolveByJdbcUrl
public static DBType resolveByJdbcUrl(String url)
Resolves DB type from JDBC URL string.- Parameters:
url
- JDBC URL- Returns:
-
-