public interface ExceptionContext
Describes the execution context in which a failure occurred.
An instance of this interface is passed to the ExceptionMapper configured on the ORM template, allowing
the mapper to base its translation on the SQL operation, the statement text and the affected data type.
- Since:
- 1.13
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondataType()Returns the entity or projection type primarily affected by the failed operation.Classifies the kind of SQL statement that failed.Returns the SQL statement that failed, with all parameters replaced by placeholders.Returns a description of the transaction in whose scope the failure occurred.
-
Method Details
-
operation
SqlOperation operation()Classifies the kind of SQL statement that failed.- Returns:
- the SQL operation;
SqlOperation.UNDEFINEDwhen the operation is unknown.
-
statement
Returns the SQL statement that failed, with all parameters replaced by placeholders.- Returns:
- the SQL statement, or empty when no statement is associated with the failure.
-
dataType
Returns the entity or projection type primarily affected by the failed operation.- Returns:
- the affected data type, or empty when the operation is not associated with a specific type.
-
transactionDescription
Returns a description of the transaction in whose scope the failure occurred.- Returns:
- the transaction description, or empty when no transaction is active or the transaction subsystem does not provide a description.
-