com.interface21.jdbc.core
Class JdbcUpdateAffectedIncorrectNumberOfRowsException
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.dao.IncorrectUpdateSemanticsDataAccessException
|
+--com.interface21.jdbc.core.JdbcUpdateAffectedIncorrectNumberOfRowsException
- All Implemented Interfaces:
- HasRootCause, java.io.Serializable
- public class JdbcUpdateAffectedIncorrectNumberOfRowsException
- extends IncorrectUpdateSemanticsDataAccessException
Exception thrown when a JDBC update affects an unexpected
number of rows. Typically we expect an update to affect a
single row, meaning it's an error if it affects multiple rows.
- Author:
- Rod Johnson
- See Also:
- Serialized Form
| 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 |
JdbcUpdateAffectedIncorrectNumberOfRowsException
public JdbcUpdateAffectedIncorrectNumberOfRowsException(java.lang.String sql,
int expected,
int actual)
- Constructor for JdbcUpdateAffectedIncorrectNumberOfRowsException.
- Parameters:
s - message
getExpectedRowsAffected
public int getExpectedRowsAffected()
getActualRowsAffected
public int getActualRowsAffected()
getDataWasUpdated
public boolean getDataWasUpdated()
- Description copied from class:
IncorrectUpdateSemanticsDataAccessException
- Return whether data was updated
- Overrides:
getDataWasUpdated in class IncorrectUpdateSemanticsDataAccessException
- See Also:
IncorrectUpdateSemanticsDataAccessException.getDataWasUpdated()
Rod Johnson and Spring contributors 2001-2003.