Module org.fuin.ddd4j.jackson
Package org.fuin.ddd4j.jackson
Class AbstractVersionedAggregateExceptionData<EX extends org.fuin.ddd4j.core.AbstractVersionedAggregateException>
java.lang.Object
org.fuin.ddd4j.jackson.AbstractAggregateExceptionData<EX>
org.fuin.ddd4j.jackson.AbstractVersionedAggregateExceptionData<EX>
- All Implemented Interfaces:
Serializable,org.fuin.ddd4j.core.ExceptionData<EX>,org.fuin.objects4j.common.ToExceptionCapable<EX>,org.fuin.objects4j.common.ValueObject
- Direct Known Subclasses:
AggregateAlreadyExistsExceptionData,AggregateVersionNotFoundExceptionData
public abstract class AbstractVersionedAggregateExceptionData<EX extends org.fuin.ddd4j.core.AbstractVersionedAggregateException>
extends AbstractAggregateExceptionData<EX>
Base class for storing the data from a
AbstractVersionedAggregateException 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.AbstractVersionedAggregateExceptionData(org.fuin.ddd4j.core.AbstractVersionedAggregateException ex) Constructor with exception. -
Method Summary
Modifier and TypeMethodDescriptionfinal intReturns the aggregate version that caused the problem.Methods inherited from class org.fuin.ddd4j.jackson.AbstractAggregateExceptionData
getAggregateId, getAggregateType, getMessageMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.fuin.ddd4j.core.ExceptionData
getDataElementMethods inherited from interface org.fuin.objects4j.common.ToExceptionCapable
toException
-
Constructor Details
-
AbstractVersionedAggregateExceptionData
protected AbstractVersionedAggregateExceptionData()Constructor only for marshalling/unmarshalling. -
AbstractVersionedAggregateExceptionData
public AbstractVersionedAggregateExceptionData(org.fuin.ddd4j.core.AbstractVersionedAggregateException ex) Constructor with exception.- Parameters:
ex- Exception to copy data from.
-
-
Method Details
-
getVersion
public final int getVersion()Returns the aggregate version that caused the problem.- Returns:
- Aggregate version.
-