Enum Database

  • All Implemented Interfaces:
    Serializable, Comparable<Database>

    public enum Database
    extends Enum<Database>
    A list of relational database systems for which Hibernate can resolve a Dialect. However, Hibernate can work with other database systems that are not listed by the Database enumeration, as long as a Dialect implementation class is provided via the hibernate.dialect configuration property.
    • Enum Constant Detail

      • DERBY

        public static final Database DERBY

        public static final Database ENTERPRISEDB
      • HSQL

        public static final Database HSQL
      • HANA

        public static final Database HANA
      • MARIADB

        public static final Database MARIADB
      • MYSQL

        public static final Database MYSQL
      • ORACLE

        public static final Database ORACLE

        public static final Database POSTGRESQL
      • SPANNER

        public static final Database SPANNER

        public static final Database SQLSERVER
      • SYBASE

        public static final Database SYBASE
    • 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())
        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.)
        name - the name of the enum constant to be returned.
        the enum constant with the specified name
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • matchesResolutionInfo

        public boolean matchesResolutionInfo​(DialectResolutionInfo info)
        Does this database match the given metadata?
      • productNameMatches

        public abstract boolean productNameMatches​(String productName)
        Does this database have the given product name?
      • getDriverClassName

        public String getDriverClassName​(String jdbcUrl)
        Get the name of the JDBC driver class for this database, or null if we're not too sure what it should be.
      • getUrlPrefix

        public String getUrlPrefix()
        Get the JDBC URL prefix used by this database.
      • matchesUrl

        public boolean matchesUrl​(String jdbcUrl)
        Does the given JDBC URL connect to this database?