Package org.hibernate.internal.util
Class JdbcExceptionHelper
- java.lang.Object
- org.hibernate.internal.util.JdbcExceptionHelper
public final classJdbcExceptionHelperextendsObject
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description staticStringdetermineSqlStateClassCode(String sqlState)static intextractErrorCode(SQLException sqlException)For the given SQLException, locates the vendor-specific error code.staticStringextractSqlState(SQLException sqlException)For the given SQLException, locates the X/Open-compliant SQLState.staticStringextractSqlStateClassCode(SQLException sqlException)For the given SQLException, locates the X/Open-compliant SQLState's class code.
Method Detail
extractErrorCode
public static int extractErrorCode(SQLException sqlException)
For the given SQLException, locates the vendor-specific error code.- Parameters:
sqlException- The exception from which to extract the SQLState- Returns:
- The error code.
extractSqlState
public static String extractSqlState(SQLException sqlException)
For the given SQLException, locates the X/Open-compliant SQLState.- Parameters:
sqlException- The exception from which to extract the SQLState- Returns:
- The SQLState code, or null.
extractSqlStateClassCode
public static String extractSqlStateClassCode(SQLException sqlException)
For the given SQLException, locates the X/Open-compliant SQLState's class code.- Parameters:
sqlException- The exception from which to extract the SQLState class code- Returns:
- The SQLState class code, or null.