java.lang.Object
edu.internet2.middleware.grouper.ext.org.apache.ddlutils.PlatformUtils

public class PlatformUtils extends Object
Utility functions for dealing with database platforms.
Version:
$Revision: 279421 $
  • Field Details

    • JDBC_DRIVER_DATADIRECT_DB2

      public static final String JDBC_DRIVER_DATADIRECT_DB2
      The DataDirect Connect DB2 jdbc driver.
      See Also:
    • JDBC_DRIVER_DATADIRECT_SQLSERVER

      public static final String JDBC_DRIVER_DATADIRECT_SQLSERVER
      The DataDirect Connect SQLServer jdbc driver.
      See Also:
    • JDBC_DRIVER_DATADIRECT_ORACLE

      public static final String JDBC_DRIVER_DATADIRECT_ORACLE
      The DataDirect Connect Oracle jdbc driver.
      See Also:
    • JDBC_DRIVER_DATADIRECT_SYBASE

      public static final String JDBC_DRIVER_DATADIRECT_SYBASE
      The DataDirect Connect Sybase jdbc driver.
      See Also:
    • JDBC_DRIVER_INET_DB2

      public static final String JDBC_DRIVER_INET_DB2
      The i-net DB2 jdbc driver.
      See Also:
    • JDBC_DRIVER_INET_ORACLE

      public static final String JDBC_DRIVER_INET_ORACLE
      The i-net Oracle jdbc driver.
      See Also:
    • JDBC_DRIVER_INET_SQLSERVER

      public static final String JDBC_DRIVER_INET_SQLSERVER
      The i-net SQLServer jdbc driver.
      See Also:
    • JDBC_DRIVER_INET_SYBASE

      public static final String JDBC_DRIVER_INET_SYBASE
      The i-net Sybase jdbc driver.
      See Also:
    • JDBC_DRIVER_INET_POOLED

      public static final String JDBC_DRIVER_INET_POOLED
      The i-net pooled jdbc driver for SQLServer and Sybase.
      See Also:
    • JDBC_DRIVER_JSQLCONNECT_SQLSERVER

      public static final String JDBC_DRIVER_JSQLCONNECT_SQLSERVER
      The JNetDirect SQLServer jdbc driver.
      See Also:
    • JDBC_DRIVER_JTDS

      public static final String JDBC_DRIVER_JTDS
      The jTDS jdbc driver for SQLServer and Sybase.
      See Also:
    • JDBC_SUBPROTOCOL_DATADIRECT_DB2

      public static final String JDBC_SUBPROTOCOL_DATADIRECT_DB2
      The subprotocol used by the DataDirect DB2 driver.
      See Also:
    • JDBC_SUBPROTOCOL_DATADIRECT_SQLSERVER

      public static final String JDBC_SUBPROTOCOL_DATADIRECT_SQLSERVER
      The subprotocol used by the DataDirect SQLServer driver.
      See Also:
    • JDBC_SUBPROTOCOL_DATADIRECT_ORACLE

      public static final String JDBC_SUBPROTOCOL_DATADIRECT_ORACLE
      The subprotocol used by the DataDirect Oracle driver.
      See Also:
    • JDBC_SUBPROTOCOL_DATADIRECT_SYBASE

      public static final String JDBC_SUBPROTOCOL_DATADIRECT_SYBASE
      The subprotocol used by the DataDirect Sybase driver.
      See Also:
    • JDBC_SUBPROTOCOL_INET_DB2

      public static final String JDBC_SUBPROTOCOL_INET_DB2
      The subprotocol used by the i-net DB2 driver.
      See Also:
    • JDBC_SUBPROTOCOL_INET_ORACLE

      public static final String JDBC_SUBPROTOCOL_INET_ORACLE
      The subprotocol used by the i-net Oracle driver.
      See Also:
    • JDBC_SUBPROTOCOL_INET_SQLSERVER

      public static final String JDBC_SUBPROTOCOL_INET_SQLSERVER
      A subprotocol used by the i-net SQLServer driver.
      See Also:
    • JDBC_SUBPROTOCOL_INET_SQLSERVER6

      public static final String JDBC_SUBPROTOCOL_INET_SQLSERVER6
      A subprotocol used by the i-net SQLServer driver.
      See Also:
    • JDBC_SUBPROTOCOL_INET_SQLSERVER7

      public static final String JDBC_SUBPROTOCOL_INET_SQLSERVER7
      A subprotocol used by the i-net SQLServer driver.
      See Also:
    • JDBC_SUBPROTOCOL_INET_SQLSERVER7A

      public static final String JDBC_SUBPROTOCOL_INET_SQLSERVER7A
      A subprotocol used by the i-net SQLServer driver.
      See Also:
    • JDBC_SUBPROTOCOL_INET_SQLSERVER_POOLED_1

      public static final String JDBC_SUBPROTOCOL_INET_SQLSERVER_POOLED_1
      A subprotocol used by the pooled i-net SQLServer driver.
      See Also:
    • JDBC_SUBPROTOCOL_INET_SQLSERVER6_POOLED_1

      public static final String JDBC_SUBPROTOCOL_INET_SQLSERVER6_POOLED_1
      A subprotocol used by the pooled i-net SQLServer driver.
      See Also:
    • JDBC_SUBPROTOCOL_INET_SQLSERVER7_POOLED_1

      public static final String JDBC_SUBPROTOCOL_INET_SQLSERVER7_POOLED_1
      A subprotocol used by the pooled i-net SQLServer driver.
      See Also:
    • JDBC_SUBPROTOCOL_INET_SQLSERVER7A_POOLED_1

      public static final String JDBC_SUBPROTOCOL_INET_SQLSERVER7A_POOLED_1
      A subprotocol used by the pooled i-net SQLServer driver.
      See Also:
    • JDBC_SUBPROTOCOL_INET_SQLSERVER_POOLED_2

      public static final String JDBC_SUBPROTOCOL_INET_SQLSERVER_POOLED_2
      A subprotocol used by the pooled i-net SQLServer driver.
      See Also:
    • JDBC_SUBPROTOCOL_INET_SQLSERVER6_POOLED_2

      public static final String JDBC_SUBPROTOCOL_INET_SQLSERVER6_POOLED_2
      A subprotocol used by the pooled i-net SQLServer driver.
      See Also:
    • JDBC_SUBPROTOCOL_INET_SQLSERVER7_POOLED_2

      public static final String JDBC_SUBPROTOCOL_INET_SQLSERVER7_POOLED_2
      A subprotocol used by the pooled i-net SQLServer driver.
      See Also:
    • JDBC_SUBPROTOCOL_INET_SQLSERVER7A_POOLED_2

      public static final String JDBC_SUBPROTOCOL_INET_SQLSERVER7A_POOLED_2
      A subprotocol used by the pooled i-net SQLServer driver.
      See Also:
    • JDBC_SUBPROTOCOL_INET_SYBASE

      public static final String JDBC_SUBPROTOCOL_INET_SYBASE
      The subprotocol used by the i-net Sybase driver.
      See Also:
    • JDBC_SUBPROTOCOL_INET_SYBASE_POOLED_1

      public static final String JDBC_SUBPROTOCOL_INET_SYBASE_POOLED_1
      The subprotocol used by the pooled i-net Sybase driver.
      See Also:
    • JDBC_SUBPROTOCOL_INET_SYBASE_POOLED_2

      public static final String JDBC_SUBPROTOCOL_INET_SYBASE_POOLED_2
      The subprotocol used by the pooled i-net Sybase driver.
      See Also:
    • JDBC_SUBPROTOCOL_JSQLCONNECT_SQLSERVER

      public static final String JDBC_SUBPROTOCOL_JSQLCONNECT_SQLSERVER
      The subprotocol used by the JNetDirect SQLServer driver.
      See Also:
    • JDBC_SUBPROTOCOL_JTDS_SQLSERVER

      public static final String JDBC_SUBPROTOCOL_JTDS_SQLSERVER
      The subprotocol used by the jTDS SQLServer driver.
      See Also:
    • JDBC_SUBPROTOCOL_JTDS_SYBASE

      public static final String JDBC_SUBPROTOCOL_JTDS_SYBASE
      The subprotocol used by the jTDS Sybase driver.
      See Also:
  • Constructor Details

    • PlatformUtils

      public PlatformUtils()
      Creates a new instance.
  • Method Details

    • determineDatabaseType

      public String determineDatabaseType(DataSource dataSource) throws DatabaseOperationException
      Tries to determine the database type for the given data source. Note that this will establish a connection to the database.
      Parameters:
      dataSource - The data source
      Returns:
      The database type or null if the database type couldn't be determined
      Throws:
      DatabaseOperationException
    • determineDatabaseType

      public String determineDatabaseType(DataSource dataSource, String username, String password) throws DatabaseOperationException
      Tries to determine the database type for the given data source. Note that this will establish a connection to the database.
      Parameters:
      dataSource - The data source
      username - The user name to use for connecting to the database
      password - The password to use for connecting to the database
      Returns:
      The database type or null if the database type couldn't be determined
      Throws:
      DatabaseOperationException
    • determineDatabaseType

      public String determineDatabaseType(String driverName, String jdbcConnectionUrl)
      Tries to determine the database type for the given jdbc driver and connection url.
      Parameters:
      driverName - The fully qualified name of the JDBC driver
      jdbcConnectionUrl - The connection url
      Returns:
      The database type or null if the database type couldn't be determined