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 CalendarCalendar for data operations.(package private) final InternalDriverFactory for JDBC objects to be created.private LanguageConnectionContextCached LanguageConnectionContext(package private) EmbedConnection -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) final voidPerform a commit if autocommit is enabled.(package private) final voidPerform a commit if one is needed.(package private) CalendargetCal()Get and save a unique calendar object for this JDBC object.(package private) final ObjectReturn an object to be used for connection synchronization.(package private) final EmbedConnectionReturn a reference to the EmbedConnection(package private) LanguageConnectionContextGet and cache the LanguageConnectionContext for this connection.(package private) static LanguageConnectionContextgetLCC(EmbedConnection conn) Gets the LanguageConnectionContext for this connection.(package private) final SQLExceptionHandle any exception.(package private) final voidIf Autocommit is on, note that a commit is needed.(package private) static SQLExceptionnewSQLException(String messageId, Object... args) (package private) final voidSetup the context stack (a.k.a. context manager) for this connection.protected static voidrestoreIntrFlagIfSeen(boolean pushStack, EmbedConnection ec) (package private) final voidSetup 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.
-