## org.hibernate.util
Class JDBCExceptionReporter

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

    public final class JDBCExceptionReporter

extends Object

Nested Class Summary
`static class` `JDBCExceptionReporter.StandardWarningHandler`
`static interface` `JDBCExceptionReporter.WarningHandler` Contract for handling `warnings`
`static class` `JDBCExceptionReporter.WarningHandlerLoggingSupport` Basic support for `JDBCExceptionReporter.WarningHandler` implementations which log

Field Summary
`static String` `DEFAULT_EXCEPTION_MSG`
`static String` `DEFAULT_WARNING_MSG`
`static org.slf4j.Logger` `log`
`static JDBCExceptionReporter.StandardWarningHandler` `STANDARD_WARNING_HANDLER`

Method Summary
`static void` `handleAndClearWarnings(Connection connection, JDBCExceptionReporter.WarningHandler handler)` General purpose handling of warnings associated with a JDBC `Connection`.
`static void` `handleAndClearWarnings(Statement statement, JDBCExceptionReporter.WarningHandler handler)` General purpose handling of warnings associated with a JDBC `Statement`.
`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)` Deprecated. Use `walkWarnings(java.sql.SQLWarning, org.hibernate.util.JDBCExceptionReporter.WarningHandler)` instead
`static void` `logWarnings(SQLWarning warning, String message)` Deprecated. Use `walkWarnings(java.sql.SQLWarning, org.hibernate.util.JDBCExceptionReporter.WarningHandler)` instead
`static void` `walkWarnings(SQLWarning warning, JDBCExceptionReporter.WarningHandler handler)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### log

    public static final org.slf4j.Logger log

### DEFAULT_EXCEPTION_MSG

    public static final String DEFAULT_EXCEPTION_MSG

See Also:
  Constant Field Values

### DEFAULT_WARNING_MSG

    public static final String DEFAULT_WARNING_MSG

See Also:
  Constant Field Values

### STANDARD_WARNING_HANDLER

    public static JDBCExceptionReporter.StandardWarningHandler STANDARD_WARNING_HANDLER

Method Detail

### logAndClearWarnings

    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

### handleAndClearWarnings

    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.
  See Also:
    `walkWarnings(java.sql.SQLWarning, org.hibernate.util.JDBCExceptionReporter.WarningHandler)`

### handleAndClearWarnings

    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.
  See Also:
    `walkWarnings(java.sql.SQLWarning, org.hibernate.util.JDBCExceptionReporter.WarningHandler)`

### logWarnings

    @Deprecated
    public static void logWarnings(SQLWarning warning)

  Deprecated. Use `walkWarnings(java.sql.SQLWarning, org.hibernate.util.JDBCExceptionReporter.WarningHandler)` instead

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

  Parameters:
    `warning` - The warning to log

### logWarnings

    @Deprecated
    public static void logWarnings(SQLWarning warning,
                                              String message)

  Deprecated. Use `walkWarnings(java.sql.SQLWarning, org.hibernate.util.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

### walkWarnings

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

### logExceptions

    public static void logExceptions(SQLException ex)

### logExceptions

    public static void logExceptions(SQLException ex,
                                     String message)

Copyright © 2001-2010 Red Hat, Inc. All Rights Reserved.