java.lang.Object
java.lang.Throwable
java.lang.Exception
org.fuin.ddd4j.ddd.EntityNotFoundException
- All Implemented Interfaces:
Serializable,org.fuin.objects4j.common.ExceptionShortIdentifable,org.fuin.objects4j.common.MarshalInformation<EntityNotFoundException.Data>
public final class EntityNotFoundException
extends Exception
implements org.fuin.objects4j.common.ExceptionShortIdentifable, org.fuin.objects4j.common.MarshalInformation<EntityNotFoundException.Data>
Signals that an entity was not found.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classSpecific exception data. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionEntityNotFoundException(@NotNull EntityIdPath entityIdPath) Constructor with entity identifier path.EntityNotFoundException(EntityIdPath parentIdPath, @NotNull EntityId entityId) Constructor with all data. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
SHORT_ID
Unique short identifier of this exception.- See Also:
-
ELEMENT_NAME
Unique name of the element to use for XML and JSON marshalling/unmarshalling.- See Also:
-
-
Constructor Details
-
EntityNotFoundException
public EntityNotFoundException(@Nullable EntityIdPath parentIdPath, @NotNull @NotNull EntityId entityId) Constructor with all data.- Parameters:
parentIdPath- Path from root to parent or null if the entity identifier is a root aggregate ID.entityId- Unique identifier of the entity that was not found.
-
EntityNotFoundException
Constructor with entity identifier path.- Parameters:
entityIdPath- Entity identifier path (from root to entity).
-
-
Method Details
-
getShortId
- Specified by:
getShortIdin interfaceorg.fuin.objects4j.common.ExceptionShortIdentifable
-
getParentIdPath
Returns the path from root to parent.- Returns:
- Path.
-
getEntityId
Returns the unique identifier of the entity.- Returns:
- Unknown entity identifier.
-
getData
Returns the exception specific data.- Specified by:
getDatain interfaceorg.fuin.objects4j.common.MarshalInformation<EntityNotFoundException.Data>- Returns:
- Data structure that can be marshalled/unmarshalled.
-
getDataClass
- Specified by:
getDataClassin interfaceorg.fuin.objects4j.common.MarshalInformation<EntityNotFoundException.Data>
-
getDataElement
- Specified by:
getDataElementin interfaceorg.fuin.objects4j.common.MarshalInformation<EntityNotFoundException.Data>
-