Package com.blazebit.persistence.view
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 Summary
Constructors Constructor Description OptimisticLockException(Object entity, Object entityView)
Constructs a newOptimisticLockException
with given entity and entity view objects.OptimisticLockException(String message, Object entity, Object entityView)
Constructs a newOptimisticLockException
with given entity and entity view objects.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
getEntityView()
Returns the entity view object that caused this exception.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
OptimisticLockException
public OptimisticLockException(Object entity, Object entityView)
Constructs a newOptimisticLockException
with given entity and entity view objects.- Parameters:
entity
- The entity that caused the exceptionentityView
- The entity view that caused the exception
-
OptimisticLockException
public OptimisticLockException(String message, Object entity, Object entityView)
Constructs a newOptimisticLockException
with given entity and entity view objects.- Parameters:
message
- The exception messageentity
- The entity that caused the exceptionentityView
- The entity view that caused the exception
-
-
Method Detail
-
getEntityView
public Object getEntityView()
Returns the entity view object that caused this exception.- Returns:
- The entity view
-
-