类 SQLStateConversionDelegate
- java.lang.Object
-
- org.hibernate.exception.spi.AbstractSQLExceptionConversionDelegate
-
- org.hibernate.exception.internal.SQLStateConversionDelegate
-
- 所有已实现的接口:
SQLExceptionConversionDelegate
public class SQLStateConversionDelegate extends AbstractSQLExceptionConversionDelegate
A SQLExceptionConverter implementation which performs conversion based on the underlying SQLState. Interpretation of a SQL error based on SQLState is not nearly as accurate as using the ErrorCode (which is, however, vendor-specific). SQLState codes are defined by both ANSI SQL specs and X/Open. Some of the "classes" are shared, others are specific to one or another, yet others are custom vendor classes. Unfortunately I have not been able to find a "blessed" list of X/Open codes. These codes are cobbled together between ANSI SQL spec and error code tables from few vendors documentation.- 作者:
- Steve Ebersole
-
-
构造器概要
构造器 构造器 说明 SQLStateConversionDelegate(ConversionContext conversionContext)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 JDBCExceptionconvert(SQLException sqlException, String message, String sql)Convert the given SQLException into the HibernateJDBCExceptionhierarchy.-
从类继承的方法 org.hibernate.exception.spi.AbstractSQLExceptionConversionDelegate
getConversionContext
-
-
-
-
构造器详细资料
-
SQLStateConversionDelegate
public SQLStateConversionDelegate(ConversionContext conversionContext)
-
-
方法详细资料
-
convert
public JDBCException convert(SQLException sqlException, String message, String sql)
从接口复制的说明:SQLExceptionConversionDelegateConvert the given SQLException into the HibernateJDBCExceptionhierarchy.- 参数:
sqlException- The SQLException to be converted.message- An (optional) error message.sql- The SQL statement, if one, being performed when the exception occurred.- 返回:
- The resulting JDBCException, can be
null
-
-