Class PlatformUtils
java.lang.Object
edu.internet2.middleware.grouper.ext.org.apache.ddlutils.PlatformUtils
Utility functions for dealing with database platforms.
- Version:
- $Revision: 279421 $
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The DataDirect Connect DB2 jdbc driver.static final String
The DataDirect Connect Oracle jdbc driver.static final String
The DataDirect Connect SQLServer jdbc driver.static final String
The DataDirect Connect Sybase jdbc driver.static final String
The i-net DB2 jdbc driver.static final String
The i-net Oracle jdbc driver.static final String
The i-net pooled jdbc driver for SQLServer and Sybase.static final String
The i-net SQLServer jdbc driver.static final String
The i-net Sybase jdbc driver.static final String
The JNetDirect SQLServer jdbc driver.static final String
The jTDS jdbc driver for SQLServer and Sybase.static final String
The subprotocol used by the DataDirect DB2 driver.static final String
The subprotocol used by the DataDirect Oracle driver.static final String
The subprotocol used by the DataDirect SQLServer driver.static final String
The subprotocol used by the DataDirect Sybase driver.static final String
The subprotocol used by the i-net DB2 driver.static final String
The subprotocol used by the i-net Oracle driver.static final String
A subprotocol used by the i-net SQLServer driver.static final String
A subprotocol used by the pooled i-net SQLServer driver.static final String
A subprotocol used by the pooled i-net SQLServer driver.static final String
A subprotocol used by the i-net SQLServer driver.static final String
A subprotocol used by the pooled i-net SQLServer driver.static final String
A subprotocol used by the pooled i-net SQLServer driver.static final String
A subprotocol used by the i-net SQLServer driver.static final String
A subprotocol used by the pooled i-net SQLServer driver.static final String
A subprotocol used by the pooled i-net SQLServer driver.static final String
A subprotocol used by the i-net SQLServer driver.static final String
A subprotocol used by the pooled i-net SQLServer driver.static final String
A subprotocol used by the pooled i-net SQLServer driver.static final String
The subprotocol used by the i-net Sybase driver.static final String
The subprotocol used by the pooled i-net Sybase driver.static final String
The subprotocol used by the pooled i-net Sybase driver.static final String
The subprotocol used by the JNetDirect SQLServer driver.static final String
The subprotocol used by the jTDS SQLServer driver.static final String
The subprotocol used by the jTDS Sybase driver. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondetermineDatabaseType
(String driverName, String jdbcConnectionUrl) Tries to determine the database type for the given jdbc driver and connection url.determineDatabaseType
(DataSource dataSource) Tries to determine the database type for the given data source.determineDatabaseType
(DataSource dataSource, String username, String password) Tries to determine the database type for the given data source.
-
Field Details
-
JDBC_DRIVER_DATADIRECT_DB2
The DataDirect Connect DB2 jdbc driver.- See Also:
-
JDBC_DRIVER_DATADIRECT_SQLSERVER
The DataDirect Connect SQLServer jdbc driver.- See Also:
-
JDBC_DRIVER_DATADIRECT_ORACLE
The DataDirect Connect Oracle jdbc driver.- See Also:
-
JDBC_DRIVER_DATADIRECT_SYBASE
The DataDirect Connect Sybase jdbc driver.- See Also:
-
JDBC_DRIVER_INET_DB2
The i-net DB2 jdbc driver.- See Also:
-
JDBC_DRIVER_INET_ORACLE
The i-net Oracle jdbc driver.- See Also:
-
JDBC_DRIVER_INET_SQLSERVER
The i-net SQLServer jdbc driver.- See Also:
-
JDBC_DRIVER_INET_SYBASE
The i-net Sybase jdbc driver.- See Also:
-
JDBC_DRIVER_INET_POOLED
The i-net pooled jdbc driver for SQLServer and Sybase.- See Also:
-
JDBC_DRIVER_JSQLCONNECT_SQLSERVER
The JNetDirect SQLServer jdbc driver.- See Also:
-
JDBC_DRIVER_JTDS
The jTDS jdbc driver for SQLServer and Sybase.- See Also:
-
JDBC_SUBPROTOCOL_DATADIRECT_DB2
The subprotocol used by the DataDirect DB2 driver.- See Also:
-
JDBC_SUBPROTOCOL_DATADIRECT_SQLSERVER
The subprotocol used by the DataDirect SQLServer driver.- See Also:
-
JDBC_SUBPROTOCOL_DATADIRECT_ORACLE
The subprotocol used by the DataDirect Oracle driver.- See Also:
-
JDBC_SUBPROTOCOL_DATADIRECT_SYBASE
The subprotocol used by the DataDirect Sybase driver.- See Also:
-
JDBC_SUBPROTOCOL_INET_DB2
The subprotocol used by the i-net DB2 driver.- See Also:
-
JDBC_SUBPROTOCOL_INET_ORACLE
The subprotocol used by the i-net Oracle driver.- See Also:
-
JDBC_SUBPROTOCOL_INET_SQLSERVER
A subprotocol used by the i-net SQLServer driver.- See Also:
-
JDBC_SUBPROTOCOL_INET_SQLSERVER6
A subprotocol used by the i-net SQLServer driver.- See Also:
-
JDBC_SUBPROTOCOL_INET_SQLSERVER7
A subprotocol used by the i-net SQLServer driver.- See Also:
-
JDBC_SUBPROTOCOL_INET_SQLSERVER7A
A subprotocol used by the i-net SQLServer driver.- See Also:
-
JDBC_SUBPROTOCOL_INET_SQLSERVER_POOLED_1
A subprotocol used by the pooled i-net SQLServer driver.- See Also:
-
JDBC_SUBPROTOCOL_INET_SQLSERVER6_POOLED_1
A subprotocol used by the pooled i-net SQLServer driver.- See Also:
-
JDBC_SUBPROTOCOL_INET_SQLSERVER7_POOLED_1
A subprotocol used by the pooled i-net SQLServer driver.- See Also:
-
JDBC_SUBPROTOCOL_INET_SQLSERVER7A_POOLED_1
A subprotocol used by the pooled i-net SQLServer driver.- See Also:
-
JDBC_SUBPROTOCOL_INET_SQLSERVER_POOLED_2
A subprotocol used by the pooled i-net SQLServer driver.- See Also:
-
JDBC_SUBPROTOCOL_INET_SQLSERVER6_POOLED_2
A subprotocol used by the pooled i-net SQLServer driver.- See Also:
-
JDBC_SUBPROTOCOL_INET_SQLSERVER7_POOLED_2
A subprotocol used by the pooled i-net SQLServer driver.- See Also:
-
JDBC_SUBPROTOCOL_INET_SQLSERVER7A_POOLED_2
A subprotocol used by the pooled i-net SQLServer driver.- See Also:
-
JDBC_SUBPROTOCOL_INET_SYBASE
The subprotocol used by the i-net Sybase driver.- See Also:
-
JDBC_SUBPROTOCOL_INET_SYBASE_POOLED_1
The subprotocol used by the pooled i-net Sybase driver.- See Also:
-
JDBC_SUBPROTOCOL_INET_SYBASE_POOLED_2
The subprotocol used by the pooled i-net Sybase driver.- See Also:
-
JDBC_SUBPROTOCOL_JSQLCONNECT_SQLSERVER
The subprotocol used by the JNetDirect SQLServer driver.- See Also:
-
JDBC_SUBPROTOCOL_JTDS_SQLSERVER
The subprotocol used by the jTDS SQLServer driver.- See Also:
-
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
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 sourceusername
- The user name to use for connecting to the databasepassword
- 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
Tries to determine the database type for the given jdbc driver and connection url.- Parameters:
driverName
- The fully qualified name of the JDBC driverjdbcConnectionUrl
- The connection url- Returns:
- The database type or
null
if the database type couldn't be determined
-