Package org.hibernate.util
Class JDBCExceptionReporter
java.lang.Object
org.hibernate.util.JDBCExceptionReporter
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic interfaceContract for handlingwarningsstatic classBasic support forJDBCExceptionReporter.WarningHandlerimplementations which log -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic voidhandleAndClearWarnings(Connection connection, JDBCExceptionReporter.WarningHandler handler) General purpose handling of warnings associated with a JDBCConnection.static voidhandleAndClearWarnings(Statement statement, JDBCExceptionReporter.WarningHandler handler) General purpose handling of warnings associated with a JDBCStatement.static voidlogAndClearWarnings(Connection connection) Standard (legacy) behavior for logging warnings associated with a JDBCConnectionand clearing them.static voidstatic voidlogExceptions(SQLException ex, String message) static voidlogWarnings(SQLWarning warning) Deprecated.static voidlogWarnings(SQLWarning warning, String message) Deprecated.static voidwalkWarnings(SQLWarning warning, JDBCExceptionReporter.WarningHandler handler)
-
Field Details
-
log
-
DEFAULT_EXCEPTION_MSG
- See Also:
-
DEFAULT_WARNING_MSG
- See Also:
-
STANDARD_WARNING_HANDLER
-
-
Method Details
-
logAndClearWarnings
Standard (legacy) behavior for logging warnings associated with a JDBCConnectionand clearing them. CallshandleAndClearWarnings(Connection, WarningHandler)usingSTANDARD_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 JDBCConnection.- Parameters:
connection- The JDBC connection potentially containing warningshandler- The handler for each individual warning in the stack.- See Also:
-
handleAndClearWarnings
public static void handleAndClearWarnings(Statement statement, JDBCExceptionReporter.WarningHandler handler) General purpose handling of warnings associated with a JDBCStatement.- Parameters:
statement- The JDBC statement potentially containing warningshandler- The handler for each individual warning in the stack.- See Also:
-
logWarnings
Deprecated.Log the given warning and all of its nested warnings, preceded with thedefault message- Parameters:
warning- The warning to log
-
logWarnings
Deprecated.Log the given warning and all of its nested warnings, preceded with the given message- Parameters:
warning- The warning to logmessage- The prologue message
-
walkWarnings
-
logExceptions
-
logExceptions
-
walkWarnings(java.sql.SQLWarning, org.hibernate.util.JDBCExceptionReporter.WarningHandler)instead