Enum Dbms

java.lang.Object
java.lang.Enum<Dbms>
de.xima.fc.persistence.Dbms
All Implemented Interfaces:
Serializable, Comparable<Dbms>

public enum Dbms extends Enum<Dbms>
Enumeration of known Database Management Systems (DBMS). No guarantee is given that all DBMS are covered.
Since:
8.5.0
Author:
Norman Lorenz
  • Enum Constant Details

    • POSTGRESQL

      public static final Dbms POSTGRESQL
    • MYSQL

      public static final Dbms MYSQL
    • MARIADB

      public static final Dbms MARIADB
    • ORACLE

      public static final Dbms ORACLE
    • SQLSERVER

      public static final Dbms SQLSERVER
    • H2

      public static final Dbms H2
  • Method Details

    • values

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

      public static Dbms 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
    • acceptsUrl

      public boolean acceptsUrl(String jdbcUrl)
    • fromDriverClass

      public static Dbms fromDriverClass(Class<? extends Driver> driverClass)
      Try to detect the DBMS from a JDBC Driver class.
      Parameters:
      driverClass - JDBC Driver class
      Returns:
      matching Dbms or null if unknown
      Throws:
      IllegalArgumentException - if driverClass is null
    • fromJdbcUrl

      public static Dbms fromJdbcUrl(String jdbcUrl)
      Try to detect the DBMS from a JDBC URL prefix.
      Parameters:
      jdbcUrl - JDBC URL (e.g. "jdbc:postgresql://localhost/test")
      Returns:
      matching Dbms or null if unknown
      Throws:
      IllegalArgumentException - if jdbcUrl is invalid
    • getLogoInputStream

      public InputStream getLogoInputStream()
      Gets an InputStream for the logo resource of the DBMS.
      Returns:
      InputStream of the logo resource
    • getShortName

      public String getShortName()
    • getDisplayName

      public String getDisplayName()
    • getDriverClassName

      public String getDriverClassName()
    • getLogoContentType

      public String getLogoContentType()