Top Description Inners Fields Constructors Methods
org.hibernate.dialect.resolver

public Class BasicSQLExceptionConverter

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

A helper to centralize conversion of java.sql.SQLExceptions to org.hibernate.JDBCExceptions.
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
public static final BasicSQLExceptionConverter
public static final String

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
INSTANCEback to summary
public static final BasicSQLExceptionConverter INSTANCE
MSGback to summary
public static final String MSG

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.dialect.resolver back to summary

private Class BasicSQLExceptionConverter.ConstraintNameExtracter

extends Object
implements ViolatedConstraintNameExtracter
Class Inheritance
  • java.lang.Object
  • org.hibernate.dialect.resolver.BasicSQLExceptionConverter.ConstraintNameExtracter
All Implemented Interfaces
org.hibernate.exception.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.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.ViolatedConstraintNameExtracter.extractConstraintName.

Doc from org.hibernate.exception.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.