public class JdbcUpdateAffectedIncorrectNumberOfRowsException extends IncorrectUpdateSemanticsDataAccessException
| Constructor and Description | 
|---|
JdbcUpdateAffectedIncorrectNumberOfRowsException(String sql,
                                                int expected,
                                                int actual)
Constructor for JdbcUpdateAffectedIncorrectNumberOfRowsException. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
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. 
 | 
contains, getMessage, getMostSpecificCause, getRootCauseaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic 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 affectedpublic int getExpectedRowsAffected()
public int getActualRowsAffected()
public boolean wasDataUpdated()
IncorrectUpdateSemanticsDataAccessExceptionThe default implementation always returns true. This can be overridden in subclasses.
wasDataUpdated in class IncorrectUpdateSemanticsDataAccessException