Top Description Inners Fields Constructors Methods
org.hibernate.engine.jdbc.dialect.spi

public Class BasicSQLExceptionConverter

extends Object
Class Inheritance
Imports
java.sql.SQLException, org.hibernate.JDBCException, org.hibernate.exception.internal.SQLStateConverter, org.hibernate.exception.spi.ViolatedConstraintNameExtracter, org.hibernate.internal.CoreLogging, .CoreMessageLogger

A helper to centralize conversion of java.sql.SQLExceptions to org.hibernate.JDBCExceptions.

Used while querying JDBC metadata during bootstrapping

Author
Steve Ebersole

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private static final SQLStateConverter
CONVERTER

Deprecated as a consequence of SQLStateConverter being deprecated.
public static final BasicSQLExceptionConverter
INSTANCE

Singleton access

private static final CoreMessageLogger
public static final String
MSG

Message

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public JDBCException

Returns:

The converted exception.
convert
(SQLException
The exception to convert.
sqlException
)

Perform a conversion.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CONVERTERback to summary
private static final SQLStateConverter CONVERTER

Deprecated

as a consequence of SQLStateConverter being deprecated. See corresponding docs for further information.

INSTANCEback to summary
public static final BasicSQLExceptionConverter INSTANCE

Singleton access

LOGback to summary
private static final CoreMessageLogger LOG
MSGback to summary
public static final String MSG

Message

Constructor Detail

BasicSQLExceptionConverterback to summary
public BasicSQLExceptionConverter()

Method Detail

convertback to summary
public JDBCException convert(SQLException sqlException)

Perform a conversion.

Parameters
sqlException:SQLException

The exception to convert.

Returns:JDBCException

The converted exception.

org.hibernate.engine.jdbc.dialect.spi back to summary

private Class BasicSQLExceptionConverter.ConstraintNameExtracter

extends Object
implements ViolatedConstraintNameExtracter
Class Inheritance
  • java.lang.Object
  • org.hibernate.engine.jdbc.dialect.spi.BasicSQLExceptionConverter.ConstraintNameExtracter
All Implemented Interfaces
org.hibernate.exception.spi.ViolatedConstraintNameExtracter

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public String
extractConstraintName(SQLException
The exception that was the result of the constraint violation.
sqle
)

Implements org.hibernate.exception.spi.ViolatedConstraintNameExtracter.extractConstraintName.

Extract the name of the violated constraint from the given SQLException.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

ConstraintNameExtracterback to summary
private ConstraintNameExtracter()

Method Detail

extractConstraintNameback to summary
public String extractConstraintName(SQLException sqle)

Implements org.hibernate.exception.spi.ViolatedConstraintNameExtracter.extractConstraintName.

Doc from org.hibernate.exception.spi.ViolatedConstraintNameExtracter.extractConstraintName.

Extract the name of the violated constraint from the given SQLException.

Parameters
sqle:SQLException

The exception that was the result of the constraint violation.

Returns:String

The extracted constraint name.

Annotations
@Override