Package org.apache.cayenne.access
Class OptimisticLockException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.apache.cayenne.CayenneRuntimeException
org.apache.cayenne.access.OptimisticLockException
- All Implemented Interfaces:
- Serializable
public class OptimisticLockException extends CayenneRuntimeException
An exception thrown on optimistic lock failure.
- Since:
- 1.1
- See Also:
- Serialized Form
- 
Field SummaryFields Modifier and Type Field Description protected ObjectIdfailedObjectIdprotected MapqualifierSnapshotprotected StringquerySQLprotected DbEntityrootEntity
- 
Constructor SummaryConstructors Constructor Description OptimisticLockException(ObjectId id, DbEntity rootEntity, String querySQL, Map qualifierSnapshot)
- 
Method SummaryModifier and Type Method Description ObjectIdgetFailedObjectId()Returns the ObjectId of the object that caused the OptimisticLockException.Map<?,?>getFreshSnapshot(ObjectContext context)Retrieves fresh snapshot for the failed row.StringgetMessage()Returns descriptive message for this exception.MapgetQualifierSnapshot()StringgetQuerySQL()Methods inherited from class org.apache.cayenne.CayenneRuntimeExceptiongetExceptionLabel, getUnlabeledMessageMethods inherited from class java.lang.ThrowableaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
- 
Field Details- 
failedObjectId
- 
querySQL
- 
rootEntity
- 
qualifierSnapshot
 
- 
- 
Constructor Details- 
OptimisticLockException
 
- 
- 
Method Details- 
getQualifierSnapshot
- 
getQuerySQL
- 
getFreshSnapshotRetrieves fresh snapshot for the failed row. Null row indicates that it was deleted.- Since:
- 3.0
 
- 
getMessageReturns descriptive message for this exception.- Overrides:
- getMessagein class- CayenneRuntimeException
 
- 
getFailedObjectIdReturns the ObjectId of the object that caused the OptimisticLockException.- Since:
- 3.1
 
 
-