public class

SQLExceptionConverterFactory

extends Object
java.lang.Object
   ↳ org.hibernate.exception.SQLExceptionConverterFactory

Class Overview

A factory for building SQLExceptionConverter instances.

Summary

Public Methods
static SQLExceptionConverter buildMinimalSQLExceptionConverter()
Builds a minimal converter.
static SQLExceptionConverter buildSQLExceptionConverter(Dialect dialect, Properties properties)
Build a SQLExceptionConverter instance.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public static SQLExceptionConverter buildMinimalSQLExceptionConverter ()

Builds a minimal converter. The instance returned here just always converts to GenericJDBCException.

Returns
  • The minimal converter.

public static SQLExceptionConverter buildSQLExceptionConverter (Dialect dialect, Properties properties)

Build a SQLExceptionConverter instance.

First, looks for a SQL_EXCEPTION_CONVERTER property to see if the configuration specified the class of a specific converter to use. If this property is set, attempt to construct an instance of that class. If not set, or if construction fails, the converter specific to the dialect will be used.

Parameters
dialect The defined dialect.
properties The configuration properties.
Returns
  • An appropriate SQLExceptionConverter instance.
Throws
HibernateException There was an error building the SQLExceptionConverter.