public class

ObjectOptimisticLockingFailureException

extends OptimisticLockingFailureException
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
Known Direct Subclasses

Class Overview

Exception thrown on an optimistic locking violation for a mapped object. Provides information about the persistent class and the identifier.

Summary

Public Constructors
ObjectOptimisticLockingFailureException(String msg, Throwable cause)
Create a general ObjectOptimisticLockingFailureException with the given message, without any information on the affected object.
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, Throwable cause)
Create a new ObjectOptimisticLockingFailureException for the given object, with the default "optimistic locking failed" message.
ObjectOptimisticLockingFailureException(Class persistentClass, Object identifier, String msg, 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, Throwable cause)
Create a new ObjectOptimisticLockingFailureException for the given object, with the default "optimistic locking failed" message.
ObjectOptimisticLockingFailureException(String persistentClassName, Object identifier, String msg, Throwable cause)
Create a new ObjectOptimisticLockingFailureException for the given object, with the given explicit message.
Public Methods
Object getIdentifier()
Return the identifier of the object for which the locking failed.
Class getPersistentClass()
Return the persistent class of the object for which the locking failed.
String getPersistentClassName()
Return the name of the persistent class of the object for which the locking failed.
[Expand]
Inherited Methods
From class org.springframework.core.NestedRuntimeException
From class java.lang.Throwable
From class java.lang.Object

Public Constructors

public ObjectOptimisticLockingFailureException (String msg, Throwable cause)

Create a general ObjectOptimisticLockingFailureException with the given message, without any information on the affected object.

Parameters
msg the detail message
cause the source exception

public ObjectOptimisticLockingFailureException (Class persistentClass, Object identifier)

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

public ObjectOptimisticLockingFailureException (Class persistentClass, Object identifier, 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

public ObjectOptimisticLockingFailureException (Class persistentClass, Object identifier, String msg, 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

public ObjectOptimisticLockingFailureException (String persistentClassName, Object identifier)

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

public ObjectOptimisticLockingFailureException (String persistentClassName, Object identifier, 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

public ObjectOptimisticLockingFailureException (String persistentClassName, Object identifier, String msg, 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

Public Methods

public Object getIdentifier ()

Return the identifier of the object for which the locking failed.

public Class getPersistentClass ()

Return the persistent class of the object for which the locking failed. If no Class was specified, this method returns null.

public String getPersistentClassName ()

Return the name of the persistent class of the object for which the locking failed. Will work for both Class objects and String names.