Top Constructors Methods
org.hibernate.internal.util

public final Class JdbcExceptionHelper

extends Object
Class Inheritance
Imports
java.sql.SQLException

Author
Steve Ebersole

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static String
public static int

Returns:

The error code.
extractErrorCode
(SQLException
The exception from which to extract the SQLState
sqlException
)

For the given SQLException, locates the vendor-specific error code.

public static String

Returns:

The SQLState code, or null.
extractSqlState
(SQLException
The exception from which to extract the SQLState
sqlException
)

For the given SQLException, locates the X/Open-compliant SQLState.

public static String

Returns:

The SQLState class code, or null.
extractSqlStateClassCode
(SQLException
The exception from which to extract the SQLState class code
sqlException
)

For the given SQLException, locates the X/Open-compliant SQLState's class code.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

JdbcExceptionHelperback to summary
private JdbcExceptionHelper()

Method Detail

determineSqlStateClassCodeback to summary
public static String determineSqlStateClassCode(String sqlState)
extractErrorCodeback to summary
public static int extractErrorCode(SQLException sqlException)

For the given SQLException, locates the vendor-specific error code.

Parameters
sqlException:SQLException

The exception from which to extract the SQLState

Returns:int

The error code.

extractSqlStateback to summary
public static String extractSqlState(SQLException sqlException)

For the given SQLException, locates the X/Open-compliant SQLState.

Parameters
sqlException:SQLException

The exception from which to extract the SQLState

Returns:String

The SQLState code, or null.

extractSqlStateClassCodeback to summary
public static String extractSqlStateClassCode(SQLException sqlException)

For the given SQLException, locates the X/Open-compliant SQLState's class code.

Parameters
sqlException:SQLException

The exception from which to extract the SQLState class code

Returns:String

The SQLState class code, or null.