org.springframework.jdbc
Class JdbcUpdateAffectedIncorrectNumberOfRowsException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.springframework.core.NestedRuntimeException
org.springframework.dao.DataAccessException
org.springframework.dao.InvalidDataAccessResourceUsageException
org.springframework.dao.IncorrectUpdateSemanticsDataAccessException
org.springframework.jdbc.JdbcUpdateAffectedIncorrectNumberOfRowsException
- All Implemented Interfaces:
- 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, getStackTrace, initCause, printStackTrace, setStackTrace, 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)
getExpectedRowsAffected
public int getExpectedRowsAffected()
getActualRowsAffected
public int getActualRowsAffected()
getDataWasUpdated
public boolean getDataWasUpdated()
- Description copied from class:
IncorrectUpdateSemanticsDataAccessException
- Return whether data was updated.
- Specified by:
getDataWasUpdated
in class IncorrectUpdateSemanticsDataAccessException
- Returns:
- whether data was updated (as opposed to being incorrectly
updated). If this method returns true, there's nothing to roll back.
Copyright (C) 2003-2004 The Spring Framework Project.