Class OptimisticLockException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
javax.persistence.PersistenceException
javax.persistence.OptimisticLockException
com.blazebit.persistence.view.OptimisticLockException
All Implemented Interfaces:
Serializable

public class OptimisticLockException
extends javax.persistence.OptimisticLockException
Thrown when an optimistic lock conflict has been detected.
Since:
1.2.0
Author:
Christian Beikov
See Also:
Serialized Form
  • Constructor Details

    • OptimisticLockException

      public OptimisticLockException​(Object entity, Object entityView)
      Constructs a new OptimisticLockException with given entity and entity view objects.
      Parameters:
      entity - The entity that caused the exception
      entityView - The entity view that caused the exception
    • OptimisticLockException

      public OptimisticLockException​(String message, Object entity, Object entityView)
      Constructs a new OptimisticLockException with given entity and entity view objects.
      Parameters:
      message - The exception message
      entity - The entity that caused the exception
      entityView - The entity view that caused the exception
  • Method Details

    • getEntityView

      public Object getEntityView()
      Returns the entity view object that caused this exception.
      Returns:
      The entity view