Enum Database
- java.lang.Object
-
- java.lang.Enum<Database>
-
- org.xwiki.test.docker.junit5.database.Database
-
- All Implemented Interfaces:
Serializable
,Comparable<Database>
public enum Database extends Enum<Database>
The database to use for the UI tests.- Since:
- 10.9
- Version:
- $Id: 0cdbdc279edd2bc7af41edde4f0d722fd14a5aa1 $
-
-
Enum Constant Summary
Enum Constants Enum Constant Description HSQLDB_EMBEDDED
Represents the HyperSQL database, running outside of a Docker contaier.MARIADB
Represents the MariaDB database.MYSQL
Represents the MySQL database.ORACLE
Represents the Oracle database.POSTGRESQL
Represents the PostgreSQL database.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getIP()
String
getPomPropertyPrefix()
int
getPort()
void
setIP(String ip)
void
setPort(int port)
static Database
valueOf(String name)
Returns the enum constant of this type with the specified name.static Database[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
MYSQL
public static final Database MYSQL
Represents the MySQL database.
-
MARIADB
public static final Database MARIADB
Represents the MariaDB database.
-
HSQLDB_EMBEDDED
public static final Database HSQLDB_EMBEDDED
Represents the HyperSQL database, running outside of a Docker contaier.
-
POSTGRESQL
public static final Database POSTGRESQL
Represents the PostgreSQL database.
-
ORACLE
public static final Database ORACLE
Represents the Oracle database.
-
-
Method Detail
-
values
public static Database[] 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 (Database c : Database.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Database 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
-
getIP
public String getIP()
- Returns:
- the IP address to use to connect to the database (it can be different if the DB runs locally or in a Docker container)
-
setPort
public void setPort(int port)
- Parameters:
port
- seegetPort()
-
getPort
public int getPort()
- Returns:
- the port to use to connect to the database (it can be different if the DB runs locally or in a Docker container)
-
getPomPropertyPrefix
public String getPomPropertyPrefix()
- Returns:
- the prefix for defining the JDBC artifact properties in XWiki's
pom.xml
(e.gmariadb
formariadb.groupId
,mariadb.artifactId
andmariadb.version
) - Since:
- 15.2RC1
-
-