Extension SDK 10.1.2


oracle.jdeveloper.cm
Class JdbcConnectionWrapper

java.lang.Object
  extended byoracle.jdeveloper.cm.AbstractConnectionWrapper
      extended byoracle.jdeveloper.cm.JdbcConnectionWrapper

All Implemented Interfaces:
ConnectionWrapper

public class JdbcConnectionWrapper
extends AbstractConnectionWrapper

JdbcConnectionWrapper is a wrapper object used by ConnectionManager and helps manage the use of shared connections. This class implements the java.sql.Connection interface, but delegates almost everything to the connection object which it wraps.

Since:
JDeveloper 2.0.190
See Also:
Connection, ConnectionManager, ConnectionWrapper

Field Summary

Fields inherited from class oracle.jdeveloper.cm.AbstractConnectionWrapper
_connTypes, _descriptor, _manager, _prompter

Constructor Summary
protected JdbcConnectionWrapper(ConnectionDescriptor descriptor, ConnectInfoPrompter prompter, ConnectionManager manager)
package access constructor. Only ConnectionManager should instantiate this class.

Method Summary
void closeConnection()
Closes all presentations owned by this ConnectionWrapper
boolean containsPresentation(java.lang.String connType)
Checks to see if a given connection type is contained in this wrapper
protected java.sql.Connection createConnectionImpl(java.lang.String driverClass, java.lang.String url, java.util.Properties jdbcProps)
java.sql.Connection getJdbcConnection()
returns the wrapped object.
java.lang.Object getPresentation(java.lang.String connType)
returns the wrapped object.

Methods inherited from class oracle.jdeveloper.cm.AbstractConnectionWrapper
getDescriptor, getPresentationIterator, testPresentation

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JdbcConnectionWrapper

protected JdbcConnectionWrapper(ConnectionDescriptor descriptor,
                                ConnectInfoPrompter prompter,
                                ConnectionManager manager)
                         throws CMException
package access constructor. Only ConnectionManager should instantiate this class. ConnectionWrapper relies on the ConnectionManager knowing about it.
Parameters:
descriptor - the ConnectionDescriptor to use to instantiate the connection.
prompter - a ConnectInfoPrompter to use to get the user connection information.
manager - the ConnectionManager which is responsible for managing this connection.
Throws:
CMException - occurs if there is a problem registering and/or finding the JDBC driver specified in the descriptor.
See Also:
ConnectInfoPrompter

Method Detail

createConnectionImpl

protected java.sql.Connection createConnectionImpl(java.lang.String driverClass,
                                                   java.lang.String url,
                                                   java.util.Properties jdbcProps)
                                            throws java.lang.ClassNotFoundException,
                                                   java.lang.IllegalAccessException,
                                                   java.lang.InstantiationException,
                                                   java.sql.SQLException
Throws:
java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.InstantiationException
java.sql.SQLException

getPresentation

public java.lang.Object getPresentation(java.lang.String connType)
                                 throws CMException
returns the wrapped object.
Specified by:
getPresentation in interface ConnectionWrapper
Overrides:
getPresentation in class AbstractConnectionWrapper
Returns:
the underlying wrapped JDBC Connection object.
Throws:
CMException - occurs if there is a problem creating the new connection.

getJdbcConnection

public java.sql.Connection getJdbcConnection()
                                      throws CMException
returns the wrapped object.
Returns:
the underlying wrapped JDBC Connection object.
Throws:
CMException

closeConnection

public void closeConnection()
Description copied from interface: ConnectionWrapper
Closes all presentations owned by this ConnectionWrapper
Specified by:
closeConnection in interface ConnectionWrapper
Overrides:
closeConnection in class AbstractConnectionWrapper

containsPresentation

public boolean containsPresentation(java.lang.String connType)
Description copied from interface: ConnectionWrapper
Checks to see if a given connection type is contained in this wrapper
Specified by:
containsPresentation in interface ConnectionWrapper
Overrides:
containsPresentation in class AbstractConnectionWrapper

Extension SDK


Copyright © 1997, 2004, Oracle. All rights reserved.