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:
-
Constructor Summary
ConstructorsConstructorDescriptionOptimisticLockException(Object entity, Object entityView) Constructs a newOptimisticLockExceptionwith given entity and entity view objects.OptimisticLockException(String message, Object entity, Object entityView) Constructs a newOptimisticLockExceptionwith given entity and entity view objects. -
Method Summary
Modifier and TypeMethodDescriptionReturns the entity view object that caused this exception.Methods inherited from class javax.persistence.OptimisticLockException
getEntityMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
OptimisticLockException
Constructs a newOptimisticLockExceptionwith given entity and entity view objects.- Parameters:
entity- The entity that caused the exceptionentityView- The entity view that caused the exception
-
OptimisticLockException
Constructs a newOptimisticLockExceptionwith 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 Details
-
getEntityView
Returns the entity view object that caused this exception.- Returns:
- The entity view
-