org.apache.derby.impl.jdbc
Class ConnectionChild

java.lang.Object
  extended by org.apache.derby.impl.jdbc.ConnectionChild
Direct Known Subclasses:
EmbedBlob, EmbedClob, EmbedDatabaseMetaData, EmbedResultSet, EmbedSavepoint30, EmbedStatement

abstract class ConnectionChild
extends java.lang.Object

Any class in the embedded JDBC driver (ie this package) that needs to refer back to the EmbedConnection object extends this class.


Field Summary
private  java.util.Calendar cal
          Calendar for data operations.
(package private)  InternalDriver factory
          Factory for JDBC objects to be created.
(package private)  EmbedConnection localConn
           
 
Constructor Summary
ConnectionChild(EmbedConnection conn)
           
 
Method Summary
(package private)  void commitIfAutoCommit()
          Perform a commit if autocommit is enabled.
(package private)  void commitIfNeeded()
          Perform a commit if one is needed.
(package private)  java.util.Calendar getCal()
          Get and save a unique calendar object for this JDBC object.
(package private)  java.lang.Object getConnectionSynchronization()
          Return an object to be used for connection synchronization.
(package private)  EmbedConnection getEmbedConnection()
          Return a reference to the EmbedConnection
(package private)  java.sql.SQLException handleException(java.lang.Throwable t)
          Handle any exception.
(package private)  void needCommit()
          If Autocommit is on, note that a commit is needed.
(package private)  java.sql.SQLException newSQLException(java.lang.String messageId)
           
(package private)  java.sql.SQLException newSQLException(java.lang.String messageId, java.lang.Object arg1)
           
(package private)  java.sql.SQLException newSQLException(java.lang.String messageId, java.lang.Object arg1, java.lang.Object arg2)
           
(package private)  void restoreContextStack()
          Setup the context stack (a.k.a. context manager) for this connection.
(package private)  void setupContextStack()
          Setup the context stack (a.k.a. context manager) for this connection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

localConn

EmbedConnection localConn

factory

final InternalDriver factory
Factory for JDBC objects to be created.


cal

private java.util.Calendar cal
Calendar for data operations.

Constructor Detail

ConnectionChild

ConnectionChild(EmbedConnection conn)
Method Detail

getEmbedConnection

final EmbedConnection getEmbedConnection()
Return a reference to the EmbedConnection


getConnectionSynchronization

final java.lang.Object getConnectionSynchronization()
Return an object to be used for connection synchronization.


handleException

final java.sql.SQLException handleException(java.lang.Throwable t)
                                     throws java.sql.SQLException
Handle any exception.

Throws:
java.sql.SQLException - thrown if can't handle
See Also:
EmbedConnection.handleException(java.lang.Throwable)

needCommit

final void needCommit()
If Autocommit is on, note that a commit is needed.

See Also:
EmbedConnection.needCommit

commitIfNeeded

final void commitIfNeeded()
                   throws java.sql.SQLException
Perform a commit if one is needed.

Throws:
java.sql.SQLException - thrown on failure
See Also:
EmbedConnection.commitIfNeeded()

commitIfAutoCommit

final void commitIfAutoCommit()
                       throws java.sql.SQLException
Perform a commit if autocommit is enabled.

Throws:
java.sql.SQLException - thrown on failure
See Also:
EmbedConnection.commitIfNeeded()

setupContextStack

final void setupContextStack()
                      throws java.sql.SQLException
Setup the context stack (a.k.a. context manager) for this connection.

Throws:
java.sql.SQLException - thrown on failure
See Also:
EmbedConnection.setupContextStack()

restoreContextStack

final void restoreContextStack()
                        throws java.sql.SQLException
Setup the context stack (a.k.a. context manager) for this connection.

Throws:
java.sql.SQLException - thrown on failure
See Also:
EmbedConnection.restoreContextStack()

getCal

java.util.Calendar getCal()
Get and save a unique calendar object for this JDBC object. No need to synchronize because multiple threads should not be using a single JDBC object. Even if they do there is only a small window where each would get its own Calendar for a single call.


newSQLException

java.sql.SQLException newSQLException(java.lang.String messageId)

newSQLException

java.sql.SQLException newSQLException(java.lang.String messageId,
                                      java.lang.Object arg1)

newSQLException

java.sql.SQLException newSQLException(java.lang.String messageId,
                                      java.lang.Object arg1,
                                      java.lang.Object arg2)

Built on Thu 2012-03-29 21:53:33+0000, from revision ???

Apache Derby V10.6 Internals - Copyright © 2004,2007 The Apache Software Foundation. All Rights Reserved.