java.lang.Object
org.hibernate.exception.SQLStateConverter
- All Implemented Interfaces:
- SQLExceptionConverter
- public class SQLStateConverter
- extends java.lang.Object
- implements SQLExceptionConverter
A SQLExceptionConverter implementation which performs converion based on
the underlying SQLState. Interpretation of a SQL error based on SQLState
is not nearly as accurate as using the ErrorCode (which is, however, vendor-
specific). Use of a ErrorCode-based converter should be preferred approach
for converting/interpreting SQLExceptions.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
extracter
private ViolatedConstraintNameExtracter extracter
SQL_GRAMMAR_CATEGORIES
private static final java.util.Set SQL_GRAMMAR_CATEGORIES
DATA_CATEGORIES
private static final java.util.Set DATA_CATEGORIES
INTEGRITY_VIOLATION_CATEGORIES
private static final java.util.Set INTEGRITY_VIOLATION_CATEGORIES
CONNECTION_CATEGORIES
private static final java.util.Set CONNECTION_CATEGORIES
SQLStateConverter
public SQLStateConverter(ViolatedConstraintNameExtracter extracter)
convert
public org.hibernate.JDBCException convert(java.sql.SQLException sqlException,
java.lang.String message,
java.lang.String sql)
- Convert the given SQLException into Hibernate's JDBCException hierarchy.
- Specified by:
convert in interface SQLExceptionConverter
handledNonSpecificException
protected org.hibernate.JDBCException handledNonSpecificException(java.sql.SQLException sqlException,
java.lang.String message,
java.lang.String sql)
- Handle an exception not converted to a specific type based on the SQLState.