public class T4Driver extends T4Properties implements Driver
JDBC Type 4 Driver implementation.
Description: T4Driver is an implementation of the
java.sql.Driver interface. The Java SQL framework allows for
multiple database drivers to be loaded in single java program. The
T4Driver can be loaded programatically by
Class.forName("org.trafodion.jdbc.t4.T4Driver") or by passing
-Djdbc.drivers=org.trafodion.jdbc.t4.T4Driver in the command line of
the Java program.
Licensed to the Apache Software Foundation (ASF)
DriverManager,
Connection| Constructor and Description |
|---|
T4Driver()
Instantiated by either
Class.forName("org.trafodion.jdbc.t4.T4Driver")
or by passing -Djdbc.drivers=org.trafodion.jdbc.t4.T4Driver
property in the command line of the JDBC program. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
acceptsURL(String url)
Retrieves whether the Type 4 driver determined that it can open a
connection to the given URL.
|
Connection |
connect(String url,
Properties info)
Attempts to make an NDCS connection to the given URL.
|
int |
getMajorVersion()
Retrieves the driver's major JDBC version number.
|
int |
getMinorVersion()
Gets the Type 4 driver's minor version number.
|
Logger |
getParentLogger() |
DriverPropertyInfo[] |
getPropertyInfo(String url,
Properties info)
Gets information about the possible properties for the Type 4 driver.
|
boolean |
jdbcCompliant()
Returns whether the Type 4 driver is JDBC compliant.
|
getApplicationName, getCertificateDir, getCertificateFile, getCertificateFileActive, getCompression, getCpuToUse, getDelayedErrorMode, getKeepAlive, getKeepRawFetchBuffer, getLogWriter, getProperties, getReplacementString, getRoleName, getSessionName, getSPJEnv, getTcpNoDelay, getTokenAuth, getUrl, setApplicationName, setCertificateDir, setCertificateFile, setCertificateFileActive, setCompression, setCompression, setCpuToUse, setCpuToUse, setDelayedErrorMode, setDelayedErrorMode, setKeepAlive, setKeepAlive, setKeepRawFetchBuffer, setKeepRawFetchBuffer, setLogWriter, setReplacementString, setRoleName, setSessionName, setSPJEnv, setSPJEnv, setTcp_NoDelay, setTcpNoDelay, setTokenAuth, setTokenAuthpublic T4Driver()
Class.forName("org.trafodion.jdbc.t4.T4Driver")
or by passing -Djdbc.drivers=org.trafodion.jdbc.t4.T4Driver
property in the command line of the JDBC program.public boolean acceptsURL(String url) throws SQLException
jdbc:t4jdbc.acceptsURL in interface Driverurl - The URL of the database.SQLExceptionpublic Connection connect(String url, Properties info) throws SQLException
java.util.Properties argument to
pass arbitrary string name-value pairs as connection arguments.
Typically, you should include "user" and "password" properties in the
Properties object.connect in interface Driverurl - The URL string of format
jdbc:t4jdbc://host:port/:info - java.util.Properties object containing
name-value pair.TrafT4Connection object.SQLException - When an error occurs connecting to NDCS.T4Propertiespublic int getMajorVersion()
getMajorVersion in interface Driverpublic int getMinorVersion()
getMinorVersion in interface Driverpublic DriverPropertyInfo[] getPropertyInfo(String url, Properties info) throws SQLException
getPropertyInfo method is intended to allow a generic GUI
tool to determine the properties that the tool should prompt from a human
to get enough information to connect to NDCS. Depending on the values the
human has supplied so far, additional values might be necessary, so you
might need to iterate though several calls to the
getPropertyInfo method.getPropertyInfo in interface Driverurl - The URL of the database to which to connectinfo - java.util.Properties object containing
name-value pairs. The Type 4 driver ignores the Properties
parameter passed to the driver.DriverPropertyInfo containing property
details.SQLExceptionpublic boolean jdbcCompliant()
jdbcCompliant in interface Driverpublic Logger getParentLogger() throws SQLFeatureNotSupportedException
getParentLogger in interface DriverSQLFeatureNotSupportedExceptionCopyright © 2017. All Rights Reserved.