Package org.hibernate.engine.jdbc.spi
Class SqlExceptionHelper.StandardWarningHandler
java.lang.Object
org.hibernate.engine.jdbc.spi.SqlExceptionHelper.WarningHandlerLoggingSupport
org.hibernate.engine.jdbc.spi.SqlExceptionHelper.StandardWarningHandler
- All Implemented Interfaces:
SqlExceptionHelper.WarningHandler
- Enclosing class:
SqlExceptionHelper
public static class SqlExceptionHelper.StandardWarningHandler
extends SqlExceptionHelper.WarningHandlerLoggingSupport
Standard SQLWarning handler for logging warnings
-
Constructor Summary
ConstructorsConstructorDescriptionStandardWarningHandler(String introMessage) Creates a StandardWarningHandler -
Method Summary
Modifier and TypeMethodDescriptionbooleanShould processing be done? Allows short-circuiting if not.final voidhandleWarning(SQLWarning warning) Handle an individual warning in the stack.protected voidlogWarning(String description, String message) Delegate to log common details of a warningvoidprepare(SQLWarning warning) Prepare for processing of a warning stack.
-
Constructor Details
-
StandardWarningHandler
Creates a StandardWarningHandler- Parameters:
introMessage- The introduction message for the hierarchy
-
-
Method Details
-
doProcess
public boolean doProcess()Description copied from interface:SqlExceptionHelper.WarningHandlerShould processing be done? Allows short-circuiting if not.- Returns:
- True to process warnings, false otherwise.
-
prepare
Description copied from interface:SqlExceptionHelper.WarningHandlerPrepare for processing of a warning stack.Note that the warning here is also the first passed to
SqlExceptionHelper.WarningHandler.handleWarning(java.sql.SQLWarning)- Parameters:
warning- The first warning in the stack.
-
handleWarning
Description copied from interface:SqlExceptionHelper.WarningHandlerHandle an individual warning in the stack.- Specified by:
handleWarningin interfaceSqlExceptionHelper.WarningHandler- Overrides:
handleWarningin classSqlExceptionHelper.WarningHandlerLoggingSupport- Parameters:
warning- The warning to handle.
-
logWarning
Description copied from class:SqlExceptionHelper.WarningHandlerLoggingSupportDelegate to log common details of a warning- Specified by:
logWarningin classSqlExceptionHelper.WarningHandlerLoggingSupport- Parameters:
description- A description of the warningmessage- The warning message
-