Class InternalJDBCHelper


  • class InternalJDBCHelper
    extends java.lang.Object
    Helper and convenience methods and classes for creating a JDBC interface that has direct access to an open transaction of a DatabaseConnection. This class allows us to provide JDBC access to stored procedures from inside the engine.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) static java.sql.Connection createJDBCConnection​(User user, DatabaseConnection connection)
      Returns a java.sql.Connection object that is bound to the given DatabaseConnection object.
      (package private) static void disposeJDBCConnection​(java.sql.Connection jdbc_connection)
      Disposes the JDBC Connection object returned by the 'createJDBCConnection' method.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • InternalJDBCHelper

        InternalJDBCHelper()
    • Method Detail

      • createJDBCConnection

        static java.sql.Connection createJDBCConnection​(User user,
                                                        DatabaseConnection connection)
        Returns a java.sql.Connection object that is bound to the given DatabaseConnection object. Queries executed on the Connection alter the currently open transaction.

        Note: It is assumed that the DatabaseConnection is locked in exclusive mode when a query is executed (eg. via the 'executeXXX' methods in Statement).

        Note: Auto-commit is DISABLED for the SQL connection and can not be enabled.

      • disposeJDBCConnection

        static void disposeJDBCConnection​(java.sql.Connection jdbc_connection)
                                   throws java.sql.SQLException
        Disposes the JDBC Connection object returned by the 'createJDBCConnection' method. This should be called to free resources associated with the connection object.

        After this has completed the given Connection object in invalidated.

        Throws:
        java.sql.SQLException