com.holonplatform.jdbc

## Enum DatabasePlatform

- java.lang.Object
- - java.lang.Enum<DatabasePlatform>
  - - com.holonplatform.jdbc.DatabasePlatform

- All Implemented Interfaces:
    Serializable, Comparable<DatabasePlatform>

      public enum DatabasePlatform
      extends Enum<DatabasePlatform>

  Enumeration for common database platforms
  Since:
    5.0.0

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `DB2` IBM DB2
    `DB2_AS400` IBM DB2 AS400
    `DERBY` Apache Derby
    `H2` H2
    `HANA` SAP HANA
    `HSQL` HSQL
    `INFORMIX` IBN Informix
    `MARIADB` MariaDB
    `MYSQL` MySQL
    `NONE` Denote a not specified platform
    `ORACLE` Oracle
    `POSTGRESQL` PostgreSQL
    `SQL_SERVER` Microsoft SQLServer
    `SQLITE` SQLite

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static DatabasePlatform` | `fromUrl(String jdbcUrl)` Try to guess DatabasePlatform from given JDBC connection url
    `String` | `getDriverClassName()` JDBC driver class name
    `String` | `getValidationQuery()` Get connection validation query
    `String` | `getXaDriverClassName()` XA JDBC driver class name
    `static DatabasePlatform` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static DatabasePlatform[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

    - ### Methods inherited from class java.lang.Enum

      `compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### NONE

          public static final DatabasePlatform NONE

      Denote a not specified platform

    - #### DB2

          public static final DatabasePlatform DB2

      IBM DB2

    - #### DB2_AS400

          public static final DatabasePlatform DB2_AS400

      IBM DB2 AS400

    - #### DERBY

          public static final DatabasePlatform DERBY

      Apache Derby

    - #### H2

          public static final DatabasePlatform H2

      H2

    - #### HSQL

          public static final DatabasePlatform HSQL

      HSQL

    - #### INFORMIX

          public static final DatabasePlatform INFORMIX

      IBN Informix

    - #### MYSQL

          public static final DatabasePlatform MYSQL

      MySQL

    - #### MARIADB

          public static final DatabasePlatform MARIADB

      MariaDB

    - #### HANA

          public static final DatabasePlatform HANA

      SAP HANA

    - #### ORACLE

          public static final DatabasePlatform ORACLE

      Oracle

    - #### POSTGRESQL

          public static final DatabasePlatform POSTGRESQL

      PostgreSQL

    - #### SQL_SERVER

          public static final DatabasePlatform SQL_SERVER

      Microsoft SQLServer

    - #### SQLITE

          public static final DatabasePlatform SQLITE

      SQLite

  - ### Method Detail

    - #### values

          public static DatabasePlatform[] 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 (DatabasePlatform c : DatabasePlatform.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static DatabasePlatform 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

    - #### getDriverClassName

          public String getDriverClassName()

      JDBC driver class name
      Returns:
        Driver class name

    - #### getXaDriverClassName

          public String getXaDriverClassName()

      XA JDBC driver class name
      Returns:
        the XA driver class name

    - #### getValidationQuery

          public String getValidationQuery()

      Get connection validation query
      Returns:
        Connection validation query, or `null` if not available

    - #### fromUrl

          public static DatabasePlatform fromUrl(String jdbcUrl)

      Try to guess DatabasePlatform from given JDBC connection url
      Parameters:
        `jdbcUrl` - JDBC connection url
      Returns:
        Matching DatabasePlatform, or `null` if unknown

Copyright © 2017 The Holon Platform. All rights reserved.