org.springframework.dao
Class IncorrectUpdateSemanticsDataAccessException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjava.lang.RuntimeException
              extended byorg.springframework.core.NestedRuntimeException
                  extended byorg.springframework.dao.DataAccessException
                      extended byorg.springframework.dao.InvalidDataAccessResourceUsageException
                          extended byorg.springframework.dao.IncorrectUpdateSemanticsDataAccessException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
JdbcUpdateAffectedIncorrectNumberOfRowsException

public abstract class IncorrectUpdateSemanticsDataAccessException
extends InvalidDataAccessResourceUsageException

Data access exception thrown when something unintended appears to have happened with an update, but the transaction hasn't already been rolled back. Thrown, for example, when we wanted to update 1 row in an RDBMS but actually updated 3.

Version:
$Id: IncorrectUpdateSemanticsDataAccessException.java,v 1.4 2004/03/18 02:46:07 trisberg Exp $
Author:
Rod Johnson
See Also:
Serialized Form

Constructor Summary
IncorrectUpdateSemanticsDataAccessException(java.lang.String msg)
          Constructor for IncorrectUpdateSemanticsDataAccessException.
IncorrectUpdateSemanticsDataAccessException(java.lang.String msg, java.lang.Throwable ex)
          Constructor for IncorrectUpdateSemanticsDataAccessException.
 
Method Summary
abstract  boolean getDataWasUpdated()
          Return whether data was updated.
 
Methods inherited from class org.springframework.core.NestedRuntimeException
getCause, getMessage, printStackTrace, printStackTrace
 
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
 

Constructor Detail

IncorrectUpdateSemanticsDataAccessException

public IncorrectUpdateSemanticsDataAccessException(java.lang.String msg)
Constructor for IncorrectUpdateSemanticsDataAccessException.

Parameters:
msg - message

IncorrectUpdateSemanticsDataAccessException

public IncorrectUpdateSemanticsDataAccessException(java.lang.String msg,
                                                   java.lang.Throwable ex)
Constructor for IncorrectUpdateSemanticsDataAccessException.

Parameters:
msg - message
ex - root cause from the underlying API, such as JDBC
Method Detail

getDataWasUpdated

public abstract boolean getDataWasUpdated()
Return whether data was updated.

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.