java.lang.Object
org.fuin.ddd4j.jaxb.EntityNotFoundExceptionData
- All Implemented Interfaces:
Serializable,org.fuin.ddd4j.core.ExceptionData<org.fuin.ddd4j.core.EntityNotFoundException>,org.fuin.objects4j.common.ToExceptionCapable<org.fuin.ddd4j.core.EntityNotFoundException>,org.fuin.objects4j.common.ValueObject
public class EntityNotFoundExceptionData
extends Object
implements org.fuin.ddd4j.core.ExceptionData<org.fuin.ddd4j.core.EntityNotFoundException>
Stores the data from a
EntityNotFoundException for marshalling and allows recreating it after unmarshalling.
The idea is to transport an exception from the server to the client (without stack trace) and recreate it to be thrown on the client.- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructor only for marshalling/unmarshalling.EntityNotFoundExceptionData(@NotNull org.fuin.ddd4j.core.EntityNotFoundException ex) Constructor with all data. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the unique identifier of the entity.final StringReturns the exception message.Returns the path of parent (without entity ID itself).Returns the unique short identifier of the contained exception.inthashCode()org.fuin.ddd4j.core.EntityNotFoundExceptiontoString()
-
Constructor Details
-
EntityNotFoundExceptionData
protected EntityNotFoundExceptionData()Constructor only for marshalling/unmarshalling. -
EntityNotFoundExceptionData
public EntityNotFoundExceptionData(@NotNull @NotNull org.fuin.ddd4j.core.EntityNotFoundException ex) Constructor with all data.- Parameters:
ex- Exception to copy data from.
-
-
Method Details
-
getDataElement
- Specified by:
getDataElementin interfaceorg.fuin.ddd4j.core.ExceptionData<org.fuin.ddd4j.core.EntityNotFoundException>
-
getMessage
Returns the exception message.- Returns:
- Message.
-
getShortId
Returns the unique short identifier of the contained exception.- Returns:
- Unique and human readable identifier.
-
getParentIdPath
Returns the path of parent (without entity ID itself).- Returns:
- Path.
-
getEntityId
Returns the unique identifier of the entity.- Returns:
- Entity ID.
-
hashCode
public int hashCode() -
equals
-
toString
-
toException
public org.fuin.ddd4j.core.EntityNotFoundException toException()- Specified by:
toExceptionin interfaceorg.fuin.objects4j.common.ToExceptionCapable<org.fuin.ddd4j.core.EntityNotFoundException>
-