public class DataAccessException extends RuntimeException
DataAccessException is a generic RuntimeException
indicating that something went wrong while executing a SQL statement from
jOOQ. The idea behind this unchecked exception is borrowed from Spring's
JDBC's DataAccessException| Constructor and Description |
|---|
DataAccessException(String message)
Constructor for DataAccessException.
|
DataAccessException(String message,
Throwable cause)
Constructor for DataAccessException.
|
| Modifier and Type | Method and Description |
|---|---|
<T extends Throwable> |
getCause(Class<? extends T> type)
Find a root cause of a given type, or
null if no root cause
of that type was found. |
StackTraceElement[] |
getStackTrace() |
String |
sqlState()
Retrieve the
SQLException.getSQLState() from Throwable.getCause(),
if this DataAccessException was caused by a
SQLException. |
SQLStateClass |
sqlStateClass()
Decode the
SQLException.getSQLState() from Throwable.getCause()
into SQLStateClass, if this DataAccessException was
caused by a SQLException. |
SQLStateSubclass |
sqlStateSubclass()
Decode the
SQLException.getSQLState() from Throwable.getCause()
into SQLStateSubclass, if this DataAccessException was
caused by a SQLException. |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic DataAccessException(String message)
message - the detail messagepublic String sqlState()
SQLException.getSQLState() from Throwable.getCause(),
if this DataAccessException was caused by a
SQLException.public SQLStateClass sqlStateClass()
SQLException.getSQLState() from Throwable.getCause()
into SQLStateClass, if this DataAccessException was
caused by a SQLException.public SQLStateSubclass sqlStateSubclass()
SQLException.getSQLState() from Throwable.getCause()
into SQLStateSubclass, if this DataAccessException was
caused by a SQLException.public StackTraceElement[] getStackTrace()
getStackTrace in class ThrowableCopyright © 2019. All rights reserved.