Class JDBCUtils


  • public class JDBCUtils
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      JDBCUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.StringBuilder appendSQLExceptionDetails​(java.lang.StringBuilder errorMessage, java.sql.SQLException exception)
      Append to errorMessage a detailed description of the provided SQLException.
      The information appended are: SQL EXCEPTIONS details (SQLException.getSQLState(), SQLException.getErrorCode() and Throwable.getMessage()) of the linked list (SQLException.getNextException()) of exceptions
      static java.lang.StringBuilder appendSQLExceptionDetails​(java.lang.StringBuilder errorMessage, java.sql.SQLException exception, java.lang.CharSequence sqlStatements)
      Append to errorMessage a detailed description of the provided SQLException.
      The information appended are: SQL STATEMENTS SQL EXCEPTIONS details (SQLException.getSQLState(), SQLException.getErrorCode() and Throwable.getMessage()) of the linked list (SQLException.getNextException()) of exceptions
      static SQLProvider getSQLProvider​(java.lang.String driverClass, java.lang.String tableName, SQLProvider.DatabaseStoreType storeType)  
      static SQLProvider getSQLProvider​(java.util.Map<java.lang.String,​java.lang.Object> dataSourceProperties, java.lang.String tableName, SQLProvider.DatabaseStoreType storeType)  
      static SQLProvider.Factory getSQLProviderFactory​(java.lang.String url)  
      • Methods inherited from class java.lang.Object

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

      • JDBCUtils

        public JDBCUtils()
    • Method Detail

      • getSQLProviderFactory

        public static SQLProvider.Factory getSQLProviderFactory​(java.lang.String url)
      • getSQLProvider

        public static SQLProvider getSQLProvider​(java.util.Map<java.lang.String,​java.lang.Object> dataSourceProperties,
                                                 java.lang.String tableName,
                                                 SQLProvider.DatabaseStoreType storeType)
      • appendSQLExceptionDetails

        public static java.lang.StringBuilder appendSQLExceptionDetails​(java.lang.StringBuilder errorMessage,
                                                                        java.sql.SQLException exception,
                                                                        java.lang.CharSequence sqlStatements)
        Append to errorMessage a detailed description of the provided SQLException.
        The information appended are:
        • SQL STATEMENTS
        • SQL EXCEPTIONS details (SQLException.getSQLState(), SQLException.getErrorCode() and Throwable.getMessage()) of the linked list (SQLException.getNextException()) of exceptions
        Parameters:
        errorMessage - the target where append the exceptions details
        exception - the SQL exception (or warning)
        sqlStatements - the SQL statements related to the exception
        Returns:
        errorMessage
      • appendSQLExceptionDetails

        public static java.lang.StringBuilder appendSQLExceptionDetails​(java.lang.StringBuilder errorMessage,
                                                                        java.sql.SQLException exception)
        Append to errorMessage a detailed description of the provided SQLException.
        The information appended are:
        • SQL EXCEPTIONS details (SQLException.getSQLState(), SQLException.getErrorCode() and Throwable.getMessage()) of the linked list (SQLException.getNextException()) of exceptions
        Parameters:
        errorMessage - the target where append the exceptions details
        exception - the SQL exception (or warning)
        Returns:
        errorMessage