Class DBHelper


  • public final class DBHelper
    extends Object
    Database utility functions.
    • Method Detail

      • newSysGuid

        public static String newSysGuid​(Connection conn)
                                 throws SQLException
        Return a new sys_guid from database.
        Parameters:
        conn - the connection
        Returns:
        the new id string
        Throws:
        SQLException - any database error
      • getCurrentSchema

        @Deprecated
        public static String getCurrentSchema​(Connection conn)
                                       throws SQLException
        Deprecated.
        Return the current schema name. Deprecated. Use DatabaseInformation-Interface instead.
        Parameters:
        conn - the connection
        Returns:
        the schema name
        Throws:
        SQLException - any database error
      • getDatabaseFrameworkVersion

        @Deprecated
        public static Version getDatabaseFrameworkVersion​(Connection conn)
                                                   throws SQLException
        Deprecated.
        Returns the Frameworks version string of the given connection Deprecated. Use DatabaseInformation-Interface instead.
        Parameters:
        conn - Active db connection
        Returns:
        Version-string of the utPLSQL framework
        Throws:
        SQLException - any database error
      • getOracleDatabaseVersion

        @Deprecated
        public static String getOracleDatabaseVersion​(Connection conn)
                                               throws SQLException
        Deprecated.
        Returns the Oracle database Version from a given connection object Deprecated. Use DatabaseInformation-Interface instead.
        Parameters:
        conn - Connection-Object
        Returns:
        Returns version-string of the Oracle Database product component
        Throws:
        SQLException - any database error
      • enableDBMSOutput

        public static void enableDBMSOutput​(Connection conn)
        Enable the dbms_output buffer with unlimited size.
        Parameters:
        conn - the connection
      • disableDBMSOutput

        public static void disableDBMSOutput​(Connection conn)
        Disable the dbms_output buffer.
        Parameters:
        conn - the connection