Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.derby.impl.jdbc
Class ConnectionChild  view ConnectionChild download ConnectionChild.java

java.lang.Object
  extended byorg.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 local 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.
protected static boolean CLOSE
           
protected  org.apache.derby.jdbc.InternalDriver factory
          Factory for JDBC objects to be created.
protected  EmbedConnection localConn
           
protected static boolean NOCLOSE
           
 
Constructor Summary
protected ConnectionChild(EmbedConnection conn)
           
 
Method Summary
protected  void commitIfAutoCommit()
          Perform a commit if autocommit is enabled.
protected  void commitIfNeeded()
          Perform a commit if one is needed.
protected  java.util.Calendar getCal()
          Get and save a unique calendar object for this JDBC object.
protected  java.lang.Object getConnectionSynchronization()
          Return an object to be used for connection synchronization.
 org.apache.derby.iapi.services.context.ContextManager getContextManager()
           
 org.apache.derby.iapi.db.Database getDatabase()
           
protected  EmbedConnection getEmbedConnection()
          Return a reference to the EmbedConnection
protected  java.sql.SQLException handleException(java.lang.Throwable t)
          Handle any exception.
protected  java.sql.SQLException handleException(java.lang.Throwable t, boolean close)
          Handle any exception.
protected  void needCommit()
          If Autocommit is on, note that a commit is needed.
protected  java.sql.SQLException newSQLException(java.lang.String messageId)
           
protected  java.sql.SQLException newSQLException(java.lang.String messageId, java.lang.Object arg1)
           
protected  java.sql.SQLException newSQLException(java.lang.String messageId, java.lang.Object arg1, java.lang.Object arg2)
           
protected  void restoreContextStack()
          Setup the context stack (a.k.a.
protected  void setupContextStack()
          Setup the context stack (a.k.a.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLOSE

protected static final boolean CLOSE
See Also:
Constant Field Values

NOCLOSE

protected static final boolean NOCLOSE
See Also:
Constant Field Values

localConn

protected EmbedConnection localConn

factory

protected final org.apache.derby.jdbc.InternalDriver factory
Factory for JDBC objects to be created.


cal

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

Constructor Detail

ConnectionChild

protected ConnectionChild(EmbedConnection conn)
Method Detail

getEmbedConnection

protected final EmbedConnection getEmbedConnection()
Return a reference to the EmbedConnection


getConnectionSynchronization

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


handleException

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


handleException

protected final java.sql.SQLException handleException(java.lang.Throwable t,
                                                      boolean close)
                                               throws java.sql.SQLException
Handle any exception.


needCommit

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


commitIfNeeded

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


commitIfAutoCommit

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


setupContextStack

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


restoreContextStack

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


getContextManager

public org.apache.derby.iapi.services.context.ContextManager getContextManager()

getDatabase

public org.apache.derby.iapi.db.Database getDatabase()

getCal

protected 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

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

newSQLException

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

newSQLException

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