com.programix.da
Class StaleDataException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.programix.da.StaleDataException
- All Implemented Interfaces:
- Serializable
public class StaleDataException
- extends Exception
Used with Optimistic Concurrency Control to indicate that there has been an
attempt to update a record with a stale version.
For example, assume that a shipping address record with an "update count" of
5 has been read by User A. While User A is editing this data, User B also
reads version 5, edits the data, and then updates the record in the
data store (and consequently the "update count" gets changed to 6). Now,
when User A attempts to save his/her version of the record, the save fails
by throwing a StaleDataException where getTarget()
returns something like "shipping_address",
getExpectedCount() returns 5, and
getActualCount() returns 6.
The textual message for StaleDataException also includes those
three pieces of data.
- Author:
- Paul Hyde
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
StaleDataException
public StaleDataException(String target,
int expectedCount,
int actualCount)
StaleDataException
public StaleDataException()
StaleDataException
public StaleDataException(String message)
StaleDataException
public StaleDataException(String message,
Throwable cause)
StaleDataException
public StaleDataException(Throwable cause)
getTarget
public String getTarget()
getExpectedCount
public int getExpectedCount()
getActualCount
public int getActualCount()
Copyright © 2001-2009
Programix Incorporated.
All rights reserved.
ProgramixGenericLib is free
and is
OSI Certified
Open Source Software under the BSD
license.