public final class

JDBCExceptionReporter

extends Object
java.lang.Object
   ↳ org.hibernate.util.JDBCExceptionReporter

Summary

Nested Classes
class JDBCExceptionReporter.StandardWarningHandler  
interface JDBCExceptionReporter.WarningHandler Contract for handling SQLWarning warnings  
class JDBCExceptionReporter.WarningHandlerLoggingSupport Basic support for JDBCExceptionReporter.WarningHandler implementations which log  
Constants
String DEFAULT_EXCEPTION_MSG
String DEFAULT_WARNING_MSG
Fields
public static JDBCExceptionReporter.StandardWarningHandler STANDARD_WARNING_HANDLER
public static final Logger log
Public Methods
static void handleAndClearWarnings(Statement statement, JDBCExceptionReporter.WarningHandler handler)
General purpose handling of warnings associated with a JDBC Statement.
static void handleAndClearWarnings(Connection connection, JDBCExceptionReporter.WarningHandler handler)
General purpose handling of warnings associated with a JDBC Connection.
static void logAndClearWarnings(Connection connection)
Standard (legacy) behavior for logging warnings associated with a JDBC Connection and clearing them.
static void logExceptions(SQLException ex)
static void logExceptions(SQLException ex, String message)
static void logWarnings(SQLWarning warning, String message)
static void logWarnings(SQLWarning warning)
static void walkWarnings(SQLWarning warning, JDBCExceptionReporter.WarningHandler handler)
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final String DEFAULT_EXCEPTION_MSG

Constant Value: "SQL Exception"

public static final String DEFAULT_WARNING_MSG

Constant Value: "SQL Warning"

Fields

public static JDBCExceptionReporter.StandardWarningHandler STANDARD_WARNING_HANDLER

public static final Logger log

Public Methods

public static void handleAndClearWarnings (Statement statement, JDBCExceptionReporter.WarningHandler handler)

General purpose handling of warnings associated with a JDBC Statement.

Parameters
statement The JDBC statement potentially containing warnings
handler The handler for each individual warning in the stack.

public static void handleAndClearWarnings (Connection connection, JDBCExceptionReporter.WarningHandler handler)

General purpose handling of warnings associated with a JDBC Connection.

Parameters
connection The JDBC connection potentially containing warnings
handler The handler for each individual warning in the stack.

public static void logAndClearWarnings (Connection connection)

Standard (legacy) behavior for logging warnings associated with a JDBC Connection and clearing them.

Calls handleAndClearWarnings(Connection, WarningHandler) using STANDARD_WARNING_HANDLER

Parameters
connection The JDBC connection potentially containing warnings

public static void logExceptions (SQLException ex)

public static void logExceptions (SQLException ex, String message)

public static void logWarnings (SQLWarning warning, String message)

This method is deprecated.
Use walkWarnings(SQLWarning, JDBCExceptionReporter.WarningHandler) instead

Log the given warning and all of its nested warnings, preceded with the given message

Parameters
warning The warning to log
message The prologue message

public static void logWarnings (SQLWarning warning)

This method is deprecated.
Use walkWarnings(SQLWarning, JDBCExceptionReporter.WarningHandler) instead

Log the given warning and all of its nested warnings, preceded with the default message

Parameters
warning The warning to log

public static void walkWarnings (SQLWarning warning, JDBCExceptionReporter.WarningHandler handler)