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
Any class in the embedded JDBC driver (ie this package) that needs to
refer back to the EmbedConnection object extends this class.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Calendar
Calendar for data operations.(package private) final InternalDriver
Factory for JDBC objects to be created.private LanguageConnectionContext
Cached LanguageConnectionContext(package private) EmbedConnection
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) final void
Perform a commit if autocommit is enabled.(package private) final void
Perform a commit if one is needed.(package private) Calendar
getCal()
Get and save a unique calendar object for this JDBC object.(package private) final Object
Return an object to be used for connection synchronization.(package private) final EmbedConnection
Return a reference to the EmbedConnection(package private) LanguageConnectionContext
Get and cache the LanguageConnectionContext for this connection.(package private) static LanguageConnectionContext
getLCC
(EmbedConnection conn) Gets the LanguageConnectionContext for this connection.(package private) final SQLException
Handle any exception.(package private) final void
If Autocommit is on, note that a commit is needed.(package private) static SQLException
newSQLException
(String messageId, Object... args) (package private) final void
Setup the context stack (a.k.a. context manager) for this connection.protected static void
restoreIntrFlagIfSeen
(boolean pushStack, EmbedConnection ec) (package private) final void
Setup the context stack (a.k.a. context manager) for this connection.
-
Field Details
-
localConn
EmbedConnection localConn -
lcc
Cached LanguageConnectionContext -
factory
Factory for JDBC objects to be created. -
cal
Calendar for data operations.
-
-
Constructor Details
-
ConnectionChild
ConnectionChild(EmbedConnection conn)
-
-
Method Details
-
getEmbedConnection
Return a reference to the EmbedConnection -
getConnectionSynchronization
Return an object to be used for connection synchronization. -
handleException
Handle any exception.- Throws:
SQLException
- thrown if can't handle- See Also:
-
needCommit
final void needCommit()If Autocommit is on, note that a commit is needed.- See Also:
-
commitIfNeeded
Perform a commit if one is needed.- Throws:
SQLException
- thrown on failure- See Also:
-
commitIfAutoCommit
Perform a commit if autocommit is enabled.- Throws:
SQLException
- thrown on failure- See Also:
-
setupContextStack
Setup the context stack (a.k.a. context manager) for this connection.- Throws:
SQLException
- thrown on failure- See Also:
-
restoreContextStack
Setup the context stack (a.k.a. context manager) for this connection.- Throws:
SQLException
- thrown on failure- See Also:
-
getCal
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
-
restoreIntrFlagIfSeen
-
getLanguageConnectionContext
Get and cache the LanguageConnectionContext for this connection. -
getLCC
Gets the LanguageConnectionContext for this connection.
-