java.lang.Object | |
↳ | org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator |
Known Direct Subclasses |
Base class for SQLExceptionTranslator
implementations that allow for
fallback to some other SQLExceptionTranslator
.
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
logger | Logger available to subclasses |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Return the fallback exception translator, if any.
| |||||||||||
Override the default SQL state fallback translator
(typically a
SQLStateSQLExceptionTranslator ). | |||||||||||
Pre-checks the arguments, calls
doTranslate(String, String, SQLException) , and invokes the
fallback translator if necessary. |
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Build a message
String for the given SQLException . | |||||||||||
Template method for actually translating the given exception.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
org.springframework.jdbc.support.SQLExceptionTranslator
|
Logger available to subclasses
Return the fallback exception translator, if any.
Override the default SQL state fallback translator
(typically a SQLStateSQLExceptionTranslator
).
Pre-checks the arguments, calls doTranslate(String, String, SQLException)
, and invokes the
fallback translator
if necessary.
task | readable text describing the task being attempted |
---|---|
sql | SQL query or update that caused the problem (may be null ) |
ex | the offending SQLException |
SQLException
Build a message String
for the given SQLException
.
To be called by translator subclasses when creating an instance of a generic
DataAccessException
class.
task | readable text describing the task being attempted |
---|---|
sql | the SQL statement that caused the problem (may be null ) |
ex | the offending SQLException |
String
to use
Template method for actually translating the given exception.
The passed-in arguments will have been pre-checked. Furthermore, this method
is allowed to return null
to indicate that no exception match has
been found and that fallback translation should kick in.
task | readable text describing the task being attempted |
---|---|
sql | SQL query or update that caused the problem (may be null ) |
ex | the offending SQLException |
SQLException
;
or null
if no exception match found