java.lang.Object
org.hibernate.exception.ErrorCodeConverter
- All Implemented Interfaces:
- SQLExceptionConverter
- public class ErrorCodeConverter
- extends java.lang.Object
- implements SQLExceptionConverter
A SQLExceptionConverter implementation which performs converion based on
the vendor specific ErrorCode. This is just intended really as just a
base class for converters which know the interpretation of vendor-specific
codes.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
extracter
private ViolatedConstraintNameExtracter extracter
ErrorCodeConverter
public ErrorCodeConverter(ViolatedConstraintNameExtracter extracter)
getSQLGrammarErrorCodes
protected int[] getSQLGrammarErrorCodes()
- The error codes representing SQL grammar issues.
getConnectionErrorCodes
protected int[] getConnectionErrorCodes()
- The error codes representing issues with a connection.
getIntegrityViolationErrorCodes
protected int[] getIntegrityViolationErrorCodes()
- The error codes representing various types of database integrity issues.
getLockAcquisitionErrorCodes
protected int[] getLockAcquisitionErrorCodes()
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 built-in checks.
isMatch
private boolean isMatch(int[] errorCodes,
int errorCode)