Package org.apache.derby.impl.jdbc
Class ConnectionChild
- java.lang.Object
-
- org.apache.derby.impl.jdbc.ConnectionChild
-
- Direct Known Subclasses:
EmbedBlob,EmbedClob,EmbedDatabaseMetaData,EmbedResultSet,EmbedSavepoint,EmbedStatement
abstract class ConnectionChild extends java.lang.ObjectAny class in the embedded JDBC driver (ie this package) that needs to refer back to the EmbedConnection object extends this class.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.CalendarcalCalendar for data operations.(package private) InternalDriverfactoryFactory for JDBC objects to be created.private LanguageConnectionContextlccCached LanguageConnectionContext(package private) EmbedConnectionlocalConn
-
Constructor Summary
Constructors Constructor Description ConnectionChild(EmbedConnection conn)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voidcommitIfAutoCommit()Perform a commit if autocommit is enabled.(package private) voidcommitIfNeeded()Perform a commit if one is needed.(package private) java.util.CalendargetCal()Get and save a unique calendar object for this JDBC object.(package private) java.lang.ObjectgetConnectionSynchronization()Return an object to be used for connection synchronization.(package private) EmbedConnectiongetEmbedConnection()Return a reference to the EmbedConnection(package private) LanguageConnectionContextgetLanguageConnectionContext(EmbedConnection conn)Get and cache the LanguageConnectionContext for this connection.(package private) static LanguageConnectionContextgetLCC(EmbedConnection conn)Gets the LanguageConnectionContext for this connection.(package private) java.sql.SQLExceptionhandleException(java.lang.Throwable t)Handle any exception.(package private) voidneedCommit()If Autocommit is on, note that a commit is needed.(package private) static java.sql.SQLExceptionnewSQLException(java.lang.String messageId, java.lang.Object... args)(package private) voidrestoreContextStack()Setup the context stack (a.k.a. context manager) for this connection.protected static voidrestoreIntrFlagIfSeen(boolean pushStack, EmbedConnection ec)(package private) voidsetupContextStack()Setup the context stack (a.k.a. context manager) for this connection.
-
-
-
Field Detail
-
localConn
EmbedConnection localConn
-
lcc
private LanguageConnectionContext lcc
Cached LanguageConnectionContext
-
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.SQLExceptionHandle 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.SQLExceptionPerform a commit if one is needed.- Throws:
java.sql.SQLException- thrown on failure- See Also:
EmbedConnection.commitIfNeeded()
-
commitIfAutoCommit
final void commitIfAutoCommit() throws java.sql.SQLExceptionPerform a commit if autocommit is enabled.- Throws:
java.sql.SQLException- thrown on failure- See Also:
EmbedConnection.commitIfNeeded()
-
setupContextStack
final void setupContextStack() throws java.sql.SQLExceptionSetup 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.SQLExceptionSetup 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
static java.sql.SQLException newSQLException(java.lang.String messageId, java.lang.Object... args)
-
restoreIntrFlagIfSeen
protected static void restoreIntrFlagIfSeen(boolean pushStack, EmbedConnection ec)
-
getLanguageConnectionContext
LanguageConnectionContext getLanguageConnectionContext(EmbedConnection conn)
Get and cache the LanguageConnectionContext for this connection.
-
getLCC
static LanguageConnectionContext getLCC(EmbedConnection conn)
Gets the LanguageConnectionContext for this connection.
-
-