Package org.fcrepo.common.db
Enum DbPlatform
- java.lang.Object
-
- java.lang.Enum<DbPlatform>
-
- org.fcrepo.common.db.DbPlatform
-
- All Implemented Interfaces:
Serializable
,Comparable<DbPlatform>
public enum DbPlatform extends Enum<DbPlatform>
Detects the database platform from a datasource.- Since:
- 6.0.0
- Author:
- pwinckles
-
-
Enum Constant Summary
Enum Constants Enum Constant Description H2
MARIADB
MYSQL
POSTGRESQL
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DbPlatform
fromDataSource(DataSource dataSource)
static DbPlatform
fromString(String name)
String
getName()
static DbPlatform
valueOf(String name)
Returns the enum constant of this type with the specified name.static DbPlatform[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
POSTGRESQL
public static final DbPlatform POSTGRESQL
-
H2
public static final DbPlatform H2
-
MYSQL
public static final DbPlatform MYSQL
-
MARIADB
public static final DbPlatform MARIADB
-
-
Method Detail
-
values
public static DbPlatform[] 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 (DbPlatform c : DbPlatform.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DbPlatform 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
-
fromDataSource
public static DbPlatform fromDataSource(DataSource dataSource)
-
fromString
public static DbPlatform fromString(String name)
-
-