类 BadSqlGrammarException
- 所有已实现的接口:
Serializable
public class BadSqlGrammarException extends InvalidDataAccessResourceUsageException
Exception thrown when SQL specified is invalid. Such exceptions always have ajava.sql.SQLException
root cause.It would be possible to have subclasses for no such table, no such column etc. A custom SQLExceptionTranslator could create such more specific exceptions, without affecting code using this class.
- 作者:
- Rod Johnson
- 另请参阅:
InvalidResultSetAccessException
, 序列化表格
构造器概要
构造器 构造器 说明 BadSqlGrammarException(String task, String sql, SQLException ex)
Constructor for BadSqlGrammarException.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 String
getSql()
Return the SQL that caused the problem.SQLException
getSQLException()
Return the wrapped SQLException.从类继承的方法 org.springframework.core.NestedRuntimeException
contains, getMessage, getMostSpecificCause, getRootCause
构造器详细资料
BadSqlGrammarException
public BadSqlGrammarException(String task, String sql, SQLException ex)
Constructor for BadSqlGrammarException.- 参数:
task
- name of current tasksql
- the offending SQL statementex
- the root cause
方法详细资料
getSQLException
public SQLException getSQLException()
Return the wrapped SQLException.