Class JDBCUtils
java.lang.Object
org.apache.activemq.artemis.jdbc.store.drivers.JDBCUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringBuilderappendSQLExceptionDetails(StringBuilder errorMessage, SQLException exception) Append toerrorMessagea detailed description of the providedSQLException.static StringBuilderappendSQLExceptionDetails(StringBuilder errorMessage, SQLException exception, CharSequence sqlStatements) Append toerrorMessagea detailed description of the providedSQLException.static SQLProvidergetSQLProvider(String driverClass, String tableName, SQLProvider.DatabaseStoreType storeType) static SQLProvidergetSQLProvider(Map<String, Object> dataSourceProperties, String tableName, SQLProvider.DatabaseStoreType storeType) static SQLProvider.Factory
-
Constructor Details
-
JDBCUtils
public JDBCUtils()
-
-
Method Details
-
getSQLProviderFactory
-
getSQLProvider
public static SQLProvider getSQLProvider(String driverClass, String tableName, SQLProvider.DatabaseStoreType storeType) -
getSQLProvider
public static SQLProvider getSQLProvider(Map<String, Object> dataSourceProperties, String tableName, SQLProvider.DatabaseStoreType storeType) -
appendSQLExceptionDetails
public static StringBuilder appendSQLExceptionDetails(StringBuilder errorMessage, SQLException exception, CharSequence sqlStatements) Append toerrorMessagea detailed description of the providedSQLException.The information appended are:
- SQL STATEMENTS
- SQL EXCEPTIONS details (
SQLException.getSQLState(),SQLException.getErrorCode()andThrowable.getMessage()) of the linked list (SQLException.getNextException()) of exceptions
- Parameters:
errorMessage- the target where append the exceptions detailsexception- the SQL exception (or warning)sqlStatements- the SQL statements related to theexception- Returns:
errorMessage
-
appendSQLExceptionDetails
public static StringBuilder appendSQLExceptionDetails(StringBuilder errorMessage, SQLException exception) Append toerrorMessagea detailed description of the providedSQLException.The information appended are:
- SQL EXCEPTIONS details (
SQLException.getSQLState(),SQLException.getErrorCode()andThrowable.getMessage()) of the linked list (SQLException.getNextException()) of exceptions
- Parameters:
errorMessage- the target where append the exceptions detailsexception- the SQL exception (or warning)- Returns:
errorMessage
- SQL EXCEPTIONS details (
-