Class ObjectOptimisticLockingFailureException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.springframework.core.NestedRuntimeException
org.springframework.dao.DataAccessException
org.springframework.dao.TransientDataAccessException
org.springframework.dao.ConcurrencyFailureException
org.springframework.dao.OptimisticLockingFailureException
org.springframework.orm.ObjectOptimisticLockingFailureException
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- JpaOptimisticLockingFailureException
Exception thrown on an optimistic locking violation for a mapped object.
Provides information about the persistent class and the identifier.
- Since:
- 13.10.2003
- Author:
- Juergen Hoeller
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionCreate a general ObjectOptimisticLockingFailureException with the given message, without any information on the affected object.ObjectOptimisticLockingFailureException(Class<?> persistentClass, @Nullable Object identifier, String msg, @Nullable Throwable cause) Create a new ObjectOptimisticLockingFailureException for the given object, with the given explicit message.ObjectOptimisticLockingFailureException(Class<?> persistentClass, Object identifier) Create a new ObjectOptimisticLockingFailureException for the given object, with the default "optimistic locking failed" message.ObjectOptimisticLockingFailureException(Class<?> persistentClass, Object identifier, @Nullable Throwable cause) Create a new ObjectOptimisticLockingFailureException for the given object, with the default "optimistic locking failed" message.ObjectOptimisticLockingFailureException(String persistentClassName, @Nullable Object identifier, @Nullable String msg, @Nullable Throwable cause) Create a new ObjectOptimisticLockingFailureException for the given object, with the given explicit message.ObjectOptimisticLockingFailureException(String persistentClassName, Object identifier) Create a new ObjectOptimisticLockingFailureException for the given object, with the default "optimistic locking failed" message.ObjectOptimisticLockingFailureException(String persistentClassName, Object identifier, @Nullable Throwable cause) Create a new ObjectOptimisticLockingFailureException for the given object, with the default "optimistic locking failed" message.
- 
Method SummaryModifier and TypeMethodDescriptionReturn the identifier of the object for which the locking failed.Return the persistent class of the object for which the locking failed.Return the name of the persistent class of the object for which the locking failed.Methods inherited from class NestedRuntimeExceptioncontains, getMostSpecificCause, getRootCauseMethods inherited from class ThrowableaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
- 
Constructor Details- 
ObjectOptimisticLockingFailureException
- 
ObjectOptimisticLockingFailureExceptionCreate a new ObjectOptimisticLockingFailureException for the given object, with the default "optimistic locking failed" message.- Parameters:
- persistentClass- the persistent class
- identifier- the ID of the object for which the locking failed
 
- 
ObjectOptimisticLockingFailureExceptionpublic ObjectOptimisticLockingFailureException(Class<?> persistentClass, Object identifier, @Nullable Throwable cause) Create a new ObjectOptimisticLockingFailureException for the given object, with the default "optimistic locking failed" message.- Parameters:
- persistentClass- the persistent class
- identifier- the ID of the object for which the locking failed
- cause- the source exception
 
- 
ObjectOptimisticLockingFailureExceptionpublic ObjectOptimisticLockingFailureException(Class<?> persistentClass, @Nullable Object identifier, String msg, @Nullable Throwable cause) Create a new ObjectOptimisticLockingFailureException for the given object, with the given explicit message.- Parameters:
- persistentClass- the persistent class
- identifier- the ID of the object for which the locking failed
- msg- the detail message
- cause- the source exception
 
- 
ObjectOptimisticLockingFailureExceptionCreate a new ObjectOptimisticLockingFailureException for the given object, with the default "optimistic locking failed" message.- Parameters:
- persistentClassName- the name of the persistent class
- identifier- the ID of the object for which the locking failed
 
- 
ObjectOptimisticLockingFailureExceptionpublic ObjectOptimisticLockingFailureException(String persistentClassName, Object identifier, @Nullable Throwable cause) Create a new ObjectOptimisticLockingFailureException for the given object, with the default "optimistic locking failed" message.- Parameters:
- persistentClassName- the name of the persistent class
- identifier- the ID of the object for which the locking failed
- cause- the source exception
 
- 
ObjectOptimisticLockingFailureExceptionpublic ObjectOptimisticLockingFailureException(String persistentClassName, @Nullable Object identifier, @Nullable String msg, @Nullable Throwable cause) Create a new ObjectOptimisticLockingFailureException for the given object, with the given explicit message.- Parameters:
- persistentClassName- the name of the persistent class
- identifier- the ID of the object for which the locking failed
- msg- the detail message
- cause- the source exception
 
 
- 
- 
Method Details- 
getPersistentClass
- 
getPersistentClassName
- 
getIdentifier
 
-