org.springframework.orm

Class ObjectOptimisticLockingFailureException

    • Constructor Summary

      Constructors 
      Constructor and Description
      ObjectOptimisticLockingFailureException(java.lang.Class<?> persistentClass, java.lang.Object identifier)
      Create a new ObjectOptimisticLockingFailureException for the given object, with the default "optimistic locking failed" message.
      ObjectOptimisticLockingFailureException(java.lang.Class<?> persistentClass, java.lang.Object identifier, java.lang.String msg, java.lang.Throwable cause)
      Create a new ObjectOptimisticLockingFailureException for the given object, with the given explicit message.
      ObjectOptimisticLockingFailureException(java.lang.Class<?> persistentClass, java.lang.Object identifier, java.lang.Throwable cause)
      Create a new ObjectOptimisticLockingFailureException for the given object, with the default "optimistic locking failed" message.
      ObjectOptimisticLockingFailureException(java.lang.String persistentClassName, java.lang.Object identifier)
      Create a new ObjectOptimisticLockingFailureException for the given object, with the default "optimistic locking failed" message.
      ObjectOptimisticLockingFailureException(java.lang.String persistentClassName, java.lang.Object identifier, java.lang.String msg, java.lang.Throwable cause)
      Create a new ObjectOptimisticLockingFailureException for the given object, with the given explicit message.
      ObjectOptimisticLockingFailureException(java.lang.String persistentClassName, java.lang.Object identifier, java.lang.Throwable cause)
      Create a new ObjectOptimisticLockingFailureException for the given object, with the default "optimistic locking failed" message.
      ObjectOptimisticLockingFailureException(java.lang.String msg, java.lang.Throwable cause)
      Create a general ObjectOptimisticLockingFailureException with the given message, without any information on the affected object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.Object getIdentifier()
      Return the identifier of the object for which the locking failed.
      java.lang.Class<?> getPersistentClass()
      Return the persistent class of the object for which the locking failed.
      java.lang.String getPersistentClassName()
      Return the name of the persistent class of the object for which the locking failed.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ObjectOptimisticLockingFailureException

        public ObjectOptimisticLockingFailureException(java.lang.String msg,
                                                       java.lang.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
      • ObjectOptimisticLockingFailureException

        public ObjectOptimisticLockingFailureException(java.lang.Class<?> persistentClass,
                                                       java.lang.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(java.lang.Class<?> persistentClass,
                                                       java.lang.Object identifier,
                                                       @Nullable
                                                       java.lang.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
      • ObjectOptimisticLockingFailureException

        public ObjectOptimisticLockingFailureException(java.lang.Class<?> persistentClass,
                                                       java.lang.Object identifier,
                                                       java.lang.String msg,
                                                       @Nullable
                                                       java.lang.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
      • ObjectOptimisticLockingFailureException

        public ObjectOptimisticLockingFailureException(java.lang.String persistentClassName,
                                                       java.lang.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
      • ObjectOptimisticLockingFailureException

        public ObjectOptimisticLockingFailureException(java.lang.String persistentClassName,
                                                       java.lang.Object identifier,
                                                       @Nullable
                                                       java.lang.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
      • ObjectOptimisticLockingFailureException

        public ObjectOptimisticLockingFailureException(java.lang.String persistentClassName,
                                                       java.lang.Object identifier,
                                                       java.lang.String msg,
                                                       @Nullable
                                                       java.lang.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 Detail

      • getPersistentClass

        @Nullable
        public java.lang.Class<?> getPersistentClass()
        Return the persistent class of the object for which the locking failed. If no Class was specified, this method returns null.
      • getPersistentClassName

        @Nullable
        public java.lang.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.
      • getIdentifier

        @Nullable
        public java.lang.Object getIdentifier()
        Return the identifier of the object for which the locking failed.