java.lang.Object | |||||||||
↳ | java.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 |
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.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructor for JdbcUpdateAffectedIncorrectNumberOfRowsException.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Return the number of rows that have actually been affected.
| |||||||||||
Return the number of rows that should have been affected.
| |||||||||||
Return whether data was updated.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.dao.IncorrectUpdateSemanticsDataAccessException
| |||||||||||
From class
org.springframework.core.NestedRuntimeException
| |||||||||||
From class
java.lang.Throwable
| |||||||||||
From class
java.lang.Object
|
Constructor for JdbcUpdateAffectedIncorrectNumberOfRowsException.
sql | SQL we were tring to execute |
---|---|
expected | the expected number of rows affected |
actual | the actual number of rows affected |
Return the number of rows that have actually been affected.
Return the number of rows that should have been affected.
Return whether data was updated. If this method returns false, there's nothing to roll back.
The default implementation always returns true. This can be overridden in subclasses.