Class EntityNotFoundException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.axonframework.common.AxonException
org.axonframework.common.AxonNonTransientException
org.axonframework.modelling.repository.EntityNotFoundException
- All Implemented Interfaces:
Serializable
Exception indicating that an entity could not be found in, or recreated by, the
Repository.
A missing entity is definitionally non-transient: retrying the same operation will not make the entity appear. As an
AxonNonTransientException, this is reflected in retry policies and dead-letter classification via
ExceptionUtils.isExplicitlyNonTransient(Throwable).
- Since:
- 0.4.0
- Author:
- Allard Buijze, Steven van Beelen
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionEntityNotFoundException(Object identifier) Initialize anEntityNotFoundExceptionfor being unable to load an entity with the givenidentifier.EntityNotFoundException(Object identifier, String message) Initialize anEntityNotFoundExceptionfor being unable to load an entity with the givenidentifier, using the givenmessageas theThrowable.getMessage().EntityNotFoundException(Object identifier, String message, Throwable cause) Initialize anEntityNotFoundExceptionfor being unable to load an entity with the givenidentifier, using the givenmessageas theThrowable.getMessage()and the givencauseas theThrowable.getCause(). -
Method Summary
Modifier and TypeMethodDescriptionReturns the identifier of the entity that could not be found.Methods inherited from class org.axonframework.common.AxonNonTransientException
isCauseOfMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
EntityNotFoundException
Initialize anEntityNotFoundExceptionfor being unable to load an entity with the givenidentifier.- Parameters:
identifier- the identifier of the entity that could not be found
-
EntityNotFoundException
Initialize anEntityNotFoundExceptionfor being unable to load an entity with the givenidentifier, using the givenmessageas theThrowable.getMessage().- Parameters:
identifier- the identifier of the entity that could not be foundmessage- the message describing the cause of the exception
-
EntityNotFoundException
Initialize anEntityNotFoundExceptionfor being unable to load an entity with the givenidentifier, using the givenmessageas theThrowable.getMessage()and the givencauseas theThrowable.getCause().- Parameters:
identifier- the identifier of the entity that could not be foundmessage- the message describing the cause of the exceptioncause- the underlying cause of the exception
-
-
Method Details
-
identifier
Returns the identifier of the entity that could not be found.- Returns:
- the identifier of the entity that could not be found
-