java.lang.Object
org.hibernate.exception.JDBCExceptionHelper
- public final class JDBCExceptionHelper
- extends java.lang.Object
Implementation of JDBCExceptionHelper.
|
Method Summary |
static org.hibernate.JDBCException |
convert(SQLExceptionConverter converter,
java.sql.SQLException sqlException,
java.lang.String message)
Converts the given SQLException into Hibernate's JDBCException hierarchy, as well as performing
appropriate logging. |
static org.hibernate.JDBCException |
convert(SQLExceptionConverter converter,
java.sql.SQLException sqlException,
java.lang.String message,
java.lang.String sql)
Converts the given SQLException into Hibernate's JDBCException hierarchy, as well as performing
appropriate logging. |
static java.lang.String |
determineSqlStateClassCode(java.lang.String sqlState)
|
static int |
extractErrorCode(java.sql.SQLException sqlException)
For the given SQLException, locates the vendor-specific error code. |
static java.lang.String |
extractSqlState(java.sql.SQLException sqlException)
For the given SQLException, locates the X/Open-compliant SQLState. |
static java.lang.String |
extractSqlStateClassCode(java.sql.SQLException sqlException)
For the given SQLException, locates the X/Open-compliant SQLState's class code. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JDBCExceptionHelper
private JDBCExceptionHelper()
convert
public static org.hibernate.JDBCException convert(SQLExceptionConverter converter,
java.sql.SQLException sqlException,
java.lang.String message)
- Converts the given SQLException into Hibernate's JDBCException hierarchy, as well as performing
appropriate logging.
convert
public static org.hibernate.JDBCException convert(SQLExceptionConverter converter,
java.sql.SQLException sqlException,
java.lang.String message,
java.lang.String sql)
- Converts the given SQLException into Hibernate's JDBCException hierarchy, as well as performing
appropriate logging.
extractErrorCode
public static int extractErrorCode(java.sql.SQLException sqlException)
- For the given SQLException, locates the vendor-specific error code.
extractSqlState
public static java.lang.String extractSqlState(java.sql.SQLException sqlException)
- For the given SQLException, locates the X/Open-compliant SQLState.
extractSqlStateClassCode
public static java.lang.String extractSqlStateClassCode(java.sql.SQLException sqlException)
- For the given SQLException, locates the X/Open-compliant SQLState's class code.
determineSqlStateClassCode
public static java.lang.String determineSqlStateClassCode(java.lang.String sqlState)