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
An exception thrown on optimistic lock failure.
- Since:
- 1.1
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionOptimisticLockException(ObjectId id, DbEntity rootEntity, Map<String, ?> qualifierSnapshot, TranslatedStatement statement) -
Method Summary
Modifier and TypeMethodDescriptionReturns the ObjectId of the object that caused the OptimisticLockException.Map<?, ?> getFreshSnapshot(ObjectContext context) Retrieves fresh snapshot for the failed row.Returns descriptive message for this exception.Deprecated, for removal: This API element is subject to removal in a future version.Methods inherited from class CayenneRuntimeException
getExceptionLabel, getUnlabeledMessageMethods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
OptimisticLockException
public OptimisticLockException(ObjectId id, DbEntity rootEntity, Map<String, ?> qualifierSnapshot, TranslatedStatement statement)
-
-
Method Details
-
getStatement
- Since:
- 5.0
-
getQualifierSnapshot
-
getQuerySQL
Deprecated, for removal: This API element is subject to removal in a future version.in favor ofgetStatement() -
getFreshSnapshot
Retrieves fresh snapshot for the failed row. Null row indicates that it was deleted.- Since:
- 3.0
-
getMessage
Returns descriptive message for this exception.- Overrides:
getMessagein classCayenneRuntimeException
-
getFailedObjectId
Returns the ObjectId of the object that caused the OptimisticLockException.- Since:
- 3.1
-
getStatement()