Package org.fryske_akademy.jpa
Class EntityException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
jakarta.persistence.PersistenceException
org.fryske_akademy.jpa.EntityException
- All Implemented Interfaces:
Serializable
public class EntityException
extends jakarta.persistence.PersistenceException
An Exception that tracks the entity that caused the failure, useful for
example the combination of EntityListeners and batch operations.
-
Constructor Summary
ConstructorsConstructorDescriptionEntityException(EntityInterface failed) EntityException(EntityInterface failed, Exception ex) EntityException(EntityInterface failed, String message) EntityException(EntityInterface failed, String message, Exception ex) -
Method Summary
Modifier and TypeMethodDescriptionstatic Optional<EntityInterface>get hold of an entity in the exception chain.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
EntityException
-
EntityException
-
EntityException
-
EntityException
-
-
Method Details
-
fromException
get hold of an entity in the exception chain.- Parameters:
ex-- Returns:
-
getFailed
-