Enum 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 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 name
        NullPointerException - if the argument is null
      • setIP

        public void setIP​(String ip)
        Parameters:
        ip - see getIP()
      • 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 - see getPort()
      • 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.g mariadb for mariadb.groupId, mariadb.artifactId and mariadb.version)
        Since:
        15.2RC1