public class JdbcUpdateAffectedIncorrectNumberOfRowsException extends IncorrectUpdateSemanticsDataAccessException
Constructor and Description |
---|
JdbcUpdateAffectedIncorrectNumberOfRowsException(java.lang.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, getRootCause
public JdbcUpdateAffectedIncorrectNumberOfRowsException(java.lang.String sql, int expected, int actual)
sql
- the SQL we were trying to executeexpected
- the expected number of rows affectedactual
- the actual number of rows affectedpublic int getExpectedRowsAffected()
public int getActualRowsAffected()
public boolean wasDataUpdated()
IncorrectUpdateSemanticsDataAccessException
The default implementation always returns true. This can be overridden in subclasses.
wasDataUpdated
in class IncorrectUpdateSemanticsDataAccessException