com.interface21.jdbc.core
Class BadSqlGrammarException
java.lang.Object
|
+--java.lang.Throwable
|
+--java.lang.Exception
|
+--java.lang.RuntimeException
|
+--com.interface21.core.NestedRuntimeException
|
+--com.interface21.dao.DataAccessException
|
+--com.interface21.dao.InvalidDataAccessResourceUsageException
|
+--com.interface21.jdbc.core.BadSqlGrammarException
- All Implemented Interfaces:
- HasRootCause, java.io.Serializable
- public class BadSqlGrammarException
- extends InvalidDataAccessResourceUsageException
Exception thrown when SQL specified is invalid. Such exceptions
always have a java.sql.SQLException root cause.
It would be possible to have subclasses for no such table, no such column etc.
A custom SQLExceptionTranslater could create such
more specific exceptions, without affecting code using this class.
- Version:
- $Id: BadSqlGrammarException.java,v 1.1.1.1 2003/02/11 08:10:21 johnsonr Exp $
- See Also:
- Serialized Form
|
Constructor Summary |
BadSqlGrammarException(java.lang.String mesg,
java.lang.String sql,
java.sql.SQLException ex)
Constructor for BadSqlGrammerException. |
|
Method Summary |
java.lang.String |
getSql()
Return the SQL that caused the problem. |
java.sql.SQLException |
getSQLException()
Return the wrapped SQLException. |
| Methods inherited from class java.lang.Throwable |
fillInStackTrace, getLocalizedMessage, printStackTrace, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
BadSqlGrammarException
public BadSqlGrammarException(java.lang.String mesg,
java.lang.String sql,
java.sql.SQLException ex)
- Constructor for BadSqlGrammerException.
- Parameters:
mesg - detailed messagesql - the offending SQL statementex - the root cause
getSQLException
public java.sql.SQLException getSQLException()
- Return the wrapped SQLException.
- Returns:
- the wrapped SQLException
getSql
public java.lang.String getSql()
- Return the SQL that caused the problem.
- Returns:
- the offdending SQL
Rod Johnson and Spring contributors 2001-2003.