Enum Class Database

java.lang.Object
java.lang.Enum<Database>
org.hibernate.dialect.Database
All Implemented Interfaces:
Serializable, Comparable<Database>, Constable

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 Details

    • DB2

      public static final Database DB2
    • ENTERPRISEDB

      public static final Database ENTERPRISEDB
    • H2

      public static final Database H2
    • 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
    • POSTGRESQL

      public static final Database POSTGRESQL
    • SPANNER

      public static final Database SPANNER
    • SQLSERVER

      public static final Database SQLSERVER
    • SYBASE

      public static final Database SYBASE
  • Method Details

    • values

      public static Database[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Database valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class 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?
    • createDialect

      public abstract Dialect createDialect(DialectResolutionInfo info)
      Create a Dialect for the given metadata.
    • 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?