Class ChildEntityNotFoundException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.axonframework.modelling.entity.ChildEntityNotFoundException
- All Implemented Interfaces:
Serializable
Exception indicating that there was no child entity available to handle a command. This happens when one or multiple
children declare the command as supported via
EntityChildMetamodel.supportedCommands(), but none of
them return true for EntityChildMetamodel.canHandle(CommandMessage, Object, ProcessingContext). This
indicates that the command is not valid for the current state of the child entity.
Before 5.0.0
This exception was calledorg.axonframework.modelling.command.AggregateEntityNotFoundException and was thrown
when no child entity was available for an aggregate. It has been renamed to reflect the move to entities in Axon
5.0.0. In all other aspects, it remains the same.- Since:
- 3.3
- Author:
- Steven van Beelen, Mitchell Herrijgers
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionChildEntityNotFoundException(String message) Creates a new exception with the givenmessage.ChildEntityNotFoundException(CommandMessage commandMessage, Object parentEntity) Creates a new exception with the givencommandMessageandparentEntity. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ChildEntityNotFoundException
Creates a new exception with the givenmessage.- Parameters:
message- The message describing the cause of the exception.
-
ChildEntityNotFoundException
public ChildEntityNotFoundException(@Nonnull CommandMessage commandMessage, @Nonnull Object parentEntity) Creates a new exception with the givencommandMessageandparentEntity.- Parameters:
commandMessage- TheCommandMessagethat was handled.parentEntity- The parent entity instance that was expected to handle the command.
-