类 SQLExceptionConverterFactory
- java.lang.Object
-
- org.hibernate.exception.spi.SQLExceptionConverterFactory
-
public class SQLExceptionConverterFactory extends Object
A factory for building SQLExceptionConverter instances.- 作者:
- Steve Ebersole
-
-
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static SQLExceptionConverterbuildMinimalSQLExceptionConverter()Builds a minimal converter.static SQLExceptionConverterbuildSQLExceptionConverter(Dialect dialect, Properties properties)Build a SQLExceptionConverter instance.
-
-
-
方法详细资料
-
buildSQLExceptionConverter
public static SQLExceptionConverter buildSQLExceptionConverter(Dialect dialect, 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.- 参数:
dialect- The defined dialect.properties- The configuration properties.- 返回:
- An appropriate SQLExceptionConverter instance.
- 抛出:
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.- 返回:
- The minimal converter.
-
-