| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.springframework.core.NestedRuntimeException
org.springframework.dao.DataAccessException
org.springframework.dao.NonTransientDataAccessException
org.springframework.dao.InvalidDataAccessResourceUsageException
org.springframework.dao.IncorrectUpdateSemanticsDataAccessException
org.springframework.jdbc.JdbcUpdateAffectedIncorrectNumberOfRowsException
public class JdbcUpdateAffectedIncorrectNumberOfRowsException
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.
| Constructor Summary | |
|---|---|
JdbcUpdateAffectedIncorrectNumberOfRowsException(String sql,
                                                 int expected,
                                                 int actual)
Constructor for JdbcUpdateAffectedIncorrectNumberOfRowsException.  | 
|
| Method Summary | |
|---|---|
 int | 
getActualRowsAffected()
Return the number of rows that have actually been affected.  | 
 int | 
getExpectedRowsAffected()
Return the number of rows that should have been affected.  | 
 boolean | 
wasDataUpdated()
Return whether data was updated.  | 
| Methods inherited from class org.springframework.core.NestedRuntimeException | 
|---|
contains, getMessage, getMostSpecificCause, getRootCause | 
| Methods inherited from class java.lang.Throwable | 
|---|
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Constructor Detail | 
|---|
public JdbcUpdateAffectedIncorrectNumberOfRowsException(String sql,
                                                        int expected,
                                                        int actual)
sql - SQL we were tring to executeexpected - the expected number of rows affectedactual - the actual number of rows affected| Method Detail | 
|---|
public int getExpectedRowsAffected()
public int getActualRowsAffected()
public boolean wasDataUpdated()
IncorrectUpdateSemanticsDataAccessExceptionThe default implementation always returns true. This can be overridden in subclasses.
wasDataUpdated in class IncorrectUpdateSemanticsDataAccessException
  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||