Package org.hibernate.exception.spi
Class SQLExceptionConverterFactory
- java.lang.Object
-
- org.hibernate.exception.spi.SQLExceptionConverterFactory
-
public class SQLExceptionConverterFactory extends java.lang.ObjectA factory for building SQLExceptionConverter instances.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SQLExceptionConverterbuildMinimalSQLExceptionConverter()Builds a minimal converter.static SQLExceptionConverterbuildSQLExceptionConverter(Dialect dialect, java.util.Properties properties)Build a SQLExceptionConverter instance.
-
-
-
Method Detail
-
buildSQLExceptionConverter
public static SQLExceptionConverter buildSQLExceptionConverter(Dialect dialect, java.util.Properties properties) throws HibernateException
Build a SQLExceptionConverter instance. First, looks for aAvailableSettings.SQL_EXCEPTION_CONVERTERproperty 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.
-
buildMinimalSQLExceptionConverter
public static SQLExceptionConverter buildMinimalSQLExceptionConverter()
Builds a minimal converter. The instance returned here just always converts toGenericJDBCException.- Returns:
- The minimal converter.
-
-