Interface ExceptionTranslatorExecuteListener
- All Superinterfaces:
EventListener
,org.jooq.ExecuteListener
,Serializable
public interface ExceptionTranslatorExecuteListener
extends org.jooq.ExecuteListener
An
ExecuteListener
used by the auto-configured
DefaultExecuteListenerProvider
to translate exceptions in the
ExecuteContext
. Most commonly used to translate SQLExceptions
to Spring-specific DataAccessExceptions
by
adapting an existing SQLExceptionTranslator
.- Since:
- 3.3.0
- Author:
- Dennis Melzer
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final ExceptionTranslatorExecuteListener
DefaultExceptionTranslatorExecuteListener
suitable for most applications. -
Method Summary
Modifier and TypeMethodDescriptionof
(Function<org.jooq.ExecuteContext, SQLExceptionTranslator> translatorFactory) Creates a newExceptionTranslatorExecuteListener
backed by anSQLExceptionTranslator
.Methods inherited from interface org.jooq.ExecuteListener
bindEnd, bindStart, end, exception, executeEnd, executeStart, fetchEnd, fetchStart, outEnd, outStart, prepareEnd, prepareStart, recordEnd, recordStart, renderEnd, renderStart, resultEnd, resultStart, start, warning
-
Field Details
-
DEFAULT
DefaultExceptionTranslatorExecuteListener
suitable for most applications.
-
-
Method Details
-
of
static ExceptionTranslatorExecuteListener of(Function<org.jooq.ExecuteContext, SQLExceptionTranslator> translatorFactory) Creates a newExceptionTranslatorExecuteListener
backed by anSQLExceptionTranslator
.- Parameters:
translatorFactory
- factory function used to create theSQLExceptionTranslator
- Returns:
- a new
ExceptionTranslatorExecuteListener
instance
-