com.isti.util.database
Class OracleConnectionJDBC

java.lang.Object
  extended by com.isti.util.database.ConnectionJDBC
      extended by com.isti.util.database.OracleConnectionJDBC

public class OracleConnectionJDBC
extends ConnectionJDBC


Field Summary
static java.lang.String ORACALE_SUBNAME
           
static java.lang.String ORACALE_THIN_SUBNAME
           
protected static java.lang.String ORACLE_DRIVER_NAME
           
static java.lang.String ORACLE_SUBPROTOCOL
           
static java.lang.String ORACLE_THIN_URL
           
static java.lang.String ORACLE_URL
           
 
Fields inherited from class com.isti.util.database.ConnectionJDBC
DEFAULT_DRIVER_NAME, DEFAULT_PROTOCOL, DEFAULT_SUBNAME, DEFAULT_SUBPROTOCOL, DIALOG_OPTION_STR, INFO_PASSWORD_KEY, INFO_USER_KEY
 
Constructor Summary
OracleConnectionJDBC(java.lang.String hostName, int port, java.lang.String sid, java.lang.String userName, java.lang.String passWord, CallBackCompletion callBack)
          Connect to an Oracle JDBC database.
OracleConnectionJDBC(java.lang.String userName, java.lang.String passWord, CallBackCompletion callBack)
          Connect to an Oracle JDBC database.
OracleConnectionJDBC(java.lang.String url, java.lang.String userName, java.lang.String passWord, CallBackCompletion callBack)
          Connect to an Oracle JDBC database.
 
Method Summary
static void deregisterDriver()
          Drops the Oracle driver from the DriverManager's list.
static java.lang.String getURL(java.lang.String subProtocol, java.lang.String subName)
          Gets a database url of the form jdbc:subprotocol:subname
static void registerDriver()
          Registers the Oracle driver with the DriverManager.
 
Methods inherited from class com.isti.util.database.ConnectionJDBC
close, createConnection, createPasswordDialog, createPasswordPanel, createStatement, deregisterDriver, executeQuery, executeQuery, executeQueryNow, getConnection, getInfo, getStatement, getURL, initConnection, isClosed, processCallback, promptForPassword, registerDriver, saveUserPassword, setConnection, setStatement, setUserPassword, startBackgroundThread
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ORACLE_DRIVER_NAME

protected static final java.lang.String ORACLE_DRIVER_NAME
See Also:
Constant Field Values

ORACLE_SUBPROTOCOL

public static final java.lang.String ORACLE_SUBPROTOCOL
See Also:
Constant Field Values

ORACALE_SUBNAME

public static final java.lang.String ORACALE_SUBNAME
See Also:
Constant Field Values

ORACALE_THIN_SUBNAME

public static final java.lang.String ORACALE_THIN_SUBNAME
See Also:
Constant Field Values

ORACLE_URL

public static final java.lang.String ORACLE_URL

ORACLE_THIN_URL

public static final java.lang.String ORACLE_THIN_URL
Constructor Detail

OracleConnectionJDBC

public OracleConnectionJDBC(java.lang.String userName,
                            java.lang.String passWord,
                            CallBackCompletion callBack)
                     throws java.lang.ClassNotFoundException,
                            java.lang.InstantiationException,
                            java.lang.IllegalAccessException,
                            java.sql.SQLException
Connect to an Oracle JDBC database.

Parameters:
userName - user name
passWord - password for the above user name
callBack - callBack method or null to execute on current thread
Throws:
java.lang.ClassNotFoundException - if the driver's class could not be found.
java.lang.InstantiationException - if the driver could not be instantiated.
java.lang.IllegalAccessException - if the driver's class or initializer is not accessible.
java.sql.SQLException - if a database access error occurs.

OracleConnectionJDBC

public OracleConnectionJDBC(java.lang.String hostName,
                            int port,
                            java.lang.String sid,
                            java.lang.String userName,
                            java.lang.String passWord,
                            CallBackCompletion callBack)
                     throws java.lang.ClassNotFoundException,
                            java.lang.InstantiationException,
                            java.lang.IllegalAccessException,
                            java.sql.SQLException
Connect to an Oracle JDBC database.

Parameters:
hostName - host name
port - TCP/IP listener port
sid - database SID (system identifier)
userName - user name
passWord - password for the above user name
callBack - callBack method or null to execute on current thread
Throws:
java.lang.ClassNotFoundException - if the driver's class could not be found.
java.lang.InstantiationException - if the driver could not be instantiated.
java.lang.IllegalAccessException - if the driver's class or initializer is not accessible.
java.sql.SQLException - if a database access error occurs.

OracleConnectionJDBC

public OracleConnectionJDBC(java.lang.String url,
                            java.lang.String userName,
                            java.lang.String passWord,
                            CallBackCompletion callBack)
                     throws java.lang.ClassNotFoundException,
                            java.lang.InstantiationException,
                            java.lang.IllegalAccessException,
                            java.sql.SQLException
Connect to an Oracle JDBC database.

Parameters:
url - a database url of the form jdbc:subprotocol:subname
userName - user name
passWord - password for the above user name
callBack - callBack method or null to execute on current thread
Throws:
java.lang.ClassNotFoundException - if the driver's class could not be found.
java.lang.InstantiationException - if the driver could not be instantiated.
java.lang.IllegalAccessException - if the driver's class or initializer is not accessible.
java.sql.SQLException - if a database access error occurs.
Method Detail

getURL

public static java.lang.String getURL(java.lang.String subProtocol,
                                      java.lang.String subName)
Gets a database url of the form jdbc:subprotocol:subname

Parameters:
subProtocol - sub-protocol
subName - sub-name of the protocol
Returns:
database url

registerDriver

public static void registerDriver()
                           throws java.lang.ClassNotFoundException,
                                  java.lang.InstantiationException,
                                  java.lang.IllegalAccessException,
                                  java.sql.SQLException
Registers the Oracle driver with the DriverManager. A newly-loaded driver class should call the method registerDriver to make itself known to the DriverManager.

Throws:
java.lang.ClassNotFoundException - if the driver's class could not be found.
java.lang.InstantiationException - if the driver could not be instantiated.
java.lang.IllegalAccessException - if the driver's class or initializer is not accessible.
java.sql.SQLException - if a database access error occurs.

deregisterDriver

public static void deregisterDriver()
                             throws java.lang.ClassNotFoundException,
                                    java.lang.InstantiationException,
                                    java.lang.IllegalAccessException,
                                    java.sql.SQLException
Drops the Oracle driver from the DriverManager's list. Applets can only deregister Drivers from their own classloaders.

Throws:
java.lang.ClassNotFoundException - if the driver's class could not be found.
java.lang.InstantiationException - if the driver could not be instantiated.
java.lang.IllegalAccessException - if the driver's class or initializer is not accessible.
java.sql.SQLException - if a database access error occurs.