ca.idms.jdbc
Class IdmsJdbcDriver

java.lang.Object
  extended by ca.idms.jdbc.IdmsJdbcDriver
All Implemented Interfaces:
IdmsDriverInterface, java.sql.Driver

public class IdmsJdbcDriver
extends java.lang.Object
implements java.sql.Driver, IdmsDriverInterface

The CA IDMS JDBC Driver class. This class is as small as possible in line with JavaSoft recommendations.

Version:
17.00, 12/12/08
Author:
Dave Ross
See Also:
IdmsDriverInterface, IdmsConnection

Field Summary
static int MAJOR_VERSION
           
static int MINOR_VERSION
           
 
Fields inherited from interface ca.idms.jdbc.IdmsDriverInterface
ACCOUNT, BATCH, CCIHOST, CCIPORT, CSUSPEND, CUSTOM, DEF_CCIPORT, DEF_TASK, DEFSCHEM, EWAIT, INFO, INTERACTIVE, NODE, PASSWORD, PROGRAM, RSINT, SBUFLEN, SERVICE, SSL, STRACE, SUSPEND, TASK, USER, VIA
 
Constructor Summary
IdmsJdbcDriver()
           
 
Method Summary
 boolean acceptsURL(java.lang.String url)
          Returns true if the driver can process the URL.
 java.sql.Connection connect(java.lang.String url, java.util.Properties info)
          Try to make a database connection to the given URL.
 int getMajorVersion()
          Gets the driver's major version number.
 int getMinorVersion()
          Gets the driver's minor version number.
 java.sql.DriverPropertyInfo[] getPropertyInfo(java.lang.String url, java.util.Properties info)
          Allows a generic GUI tool to discover what properties provide enough information to connect to a database.
 boolean jdbcCompliant()
          Reports whether the Driver is a genuine JDBC COMPLIANT (tm) driver.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAJOR_VERSION

public static final int MAJOR_VERSION
See Also:
Constant Field Values

MINOR_VERSION

public static final int MINOR_VERSION
See Also:
Constant Field Values
Constructor Detail

IdmsJdbcDriver

public IdmsJdbcDriver()
Method Detail

getMajorVersion

public int getMajorVersion()
Gets the driver's major version number.

Specified by:
getMajorVersion in interface java.sql.Driver

getMinorVersion

public int getMinorVersion()
Gets the driver's minor version number.

Specified by:
getMinorVersion in interface java.sql.Driver

jdbcCompliant

public boolean jdbcCompliant()
Reports whether the Driver is a genuine JDBC COMPLIANT (tm) driver.

Specified by:
jdbcCompliant in interface java.sql.Driver

acceptsURL

public boolean acceptsURL(java.lang.String url)
                   throws java.sql.SQLException
Returns true if the driver can process the URL.

Specified by:
acceptsURL in interface java.sql.Driver
Parameters:
url - the URL of the database.
Returns:
true if the sub protocol is "idms".
Throws:
java.sql.SQLException - if a database-access error occurs.

connect

public java.sql.Connection connect(java.lang.String url,
                                   java.util.Properties info)
                            throws java.sql.SQLException
Try to make a database connection to the given URL.

The URL format for the CA IDMS JDBC driver is:

An ODBC style data source name can be used when connecting to the CA IDMS system through the CA IDMS Server native code, either directly or via the "proxy Server". The actual dictionary, node names, and task code are resolved by the CA IDMS Server native code, and must be defined on the system where the native code runs.

A dictionary name can be used when no ODBC style data source is defined. If connecting directly to a A CA IDMS system, no additional information is needed other than the user id and password, otherwise the additional connect information is specified using the Properties info.

Additional connection information is specified in the Properties argument. At least "user", and usually, "password" properties should be included.

Specified by:
connect in interface java.sql.Driver
Parameters:
url - the URL of the database.
info - connection arguments.
Returns:
a Connection to the URL.
Throws:
java.sql.SQLException - if an error occurs
See Also:
getPropertyInfo(java.lang.String, java.util.Properties), IdmsConnection

getPropertyInfo

public java.sql.DriverPropertyInfo[] getPropertyInfo(java.lang.String url,
                                                     java.util.Properties info)
                                              throws java.sql.SQLException
Allows a generic GUI tool to discover what properties provide enough information to connect to a database.

Specified by:
getPropertyInfo in interface java.sql.Driver
Parameters:
url - The URL of the database to connect to.
info - A proposed list of tag/value pairs that will be sent on connect.
Returns:
An array of DriverPropertyInfo objects describing possible properties.
Throws:
java.sql.SQLException - if a database-access error occurs.
See Also:
IdmsDriverInterface


Copyright © 2009 CA, All rights reserved