Top Description Fields Constructors Methods
org.hibernate.exception

public Class CacheSQLStateConverter

extends Object
implements SQLExceptionConverter
Class Inheritance
All Implemented Interfaces
org.hibernate.exception.SQLExceptionConverter
Imports
org.hibernate.JDBCException, java.sql.SQLException, java.util.HashSet, .Set

A SQLExceptionConverter implementation specific to Caché SQL, accounting for its custom integrity constraint violation error codes.
Author
Jonathan Levinson

Field Summary

Modifier and TypeField and Description
private static final Set<E>
private static final Set<E>
private ViolatedConstraintNameExtracter
private static final Set<E>
private static final Set<E>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public JDBCException

Returns:

The resulting JDBCException.
convert
(SQLException
The SQLException to be converted.
sqlException
,
String
An optional error message.
message
,
String
Optionally, the sql being performed when the exception occurred.
sql
)

Implements org.hibernate.exception.SQLExceptionConverter.convert.

Convert the given SQLException into Hibernate's JDBCException hierarchy.
protected JDBCException

Returns:

The converted exception; should never be null.
handledNonSpecificException
(SQLException
The exception to be handled.
sqlException
,
String
An optional message
message
,
String
Optionally, the sql being performed when the exception occurred.
sql
)

Handle an exception not converted to a specific type based on the SQLState.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CONNECTION_CATEGORIESback to summary
private static final Set<E> CONNECTION_CATEGORIES
DATA_CATEGORIESback to summary
private static final Set<E> DATA_CATEGORIES
extracterback to summary
private ViolatedConstraintNameExtracter extracter
INTEGRITY_VIOLATION_CATEGORIESback to summary
private static final Set<E> INTEGRITY_VIOLATION_CATEGORIES
SQL_GRAMMAR_CATEGORIESback to summary
private static final Set<E> SQL_GRAMMAR_CATEGORIES

Constructor Detail

CacheSQLStateConverterback to summary
public CacheSQLStateConverter(ViolatedConstraintNameExtracter extracter)

Method Detail

convertback to summary
public JDBCException convert(SQLException sqlException, String message, String sql)

Implements org.hibernate.exception.SQLExceptionConverter.convert.

Convert the given SQLException into Hibernate's JDBCException hierarchy.

Parameters
sqlException:SQLException

The SQLException to be converted.

message:String

An optional error message.

sql:String

Optionally, the sql being performed when the exception occurred.

Returns:JDBCException

The resulting JDBCException.

handledNonSpecificExceptionback to summary
protected JDBCException handledNonSpecificException(SQLException sqlException, String message, String sql)

Handle an exception not converted to a specific type based on the SQLState.

Parameters
sqlException:SQLException

The exception to be handled.

message:String

An optional message

sql:String

Optionally, the sql being performed when the exception occurred.

Returns:JDBCException

The converted exception; should never be null.