org.springframework.orm
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.OptimisticLockingFailureException
                                      |
                                      +--org.springframework.orm.ObjectOptimisticLockingFailureException
Direct Known Subclasses:
HibernateOptimisticLockingFailureException

public class ObjectOptimisticLockingFailureException
extends OptimisticLockingFailureException

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

Author:
Juergen Hoeller
Since: 13.10.2003

Constructor Summary
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, String msg, Throwable ex)
          Create a new ObjectOptimisticLockingFailureException for the given object, with the given explicit message.

Method Summary
 ObjectgetIdentifier()
          Return the identifier of the object for which the locking failed.
 ClassgetPersistentClass()
          Return the persistent class of the object for which the locking failed.

Methods inherited from class org.springframework.core.NestedRuntimeException
getCause, getMessage, printStackTrace, printStackTrace

Methods inherited from class java.lang.Throwable
printStackTrace, getStackTrace, setStackTrace, getLocalizedMessage, toString, fillInStackTrace, initCause

Methods inherited from class java.lang.Object
hashCode, notify, notifyAll, wait, wait, wait, getClass, equals

Constructor Detail

ObjectOptimisticLockingFailureException

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

ObjectOptimisticLockingFailureException

public ObjectOptimisticLockingFailureException(Class persistentClass, Object identifier, String msg, Throwable ex)
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 - exception message
ex - source exception
Method Detail

getIdentifier

public Object getIdentifier()
Return the identifier of the object for which the locking failed.

getPersistentClass

public Class getPersistentClass()
Return the persistent class of the object for which the locking failed.

Association Links

to Class java.lang.Class