Module org.fuin.ddd4j.jaxb
Package org.fuin.ddd4j.jaxb
Class AbstractAggregateExceptionData<EX extends org.fuin.ddd4j.core.AbstractAggregateException>
java.lang.Object
org.fuin.ddd4j.jaxb.AbstractAggregateExceptionData<EX>
- Type Parameters:
EX- Concrete type of wrapped exception.
- All Implemented Interfaces:
Serializable,org.fuin.ddd4j.core.ExceptionData<EX>,org.fuin.objects4j.common.ToExceptionCapable<EX>,org.fuin.objects4j.common.ValueObject
- Direct Known Subclasses:
AbstractVersionedAggregateExceptionData,AggregateDeletedExceptionData,AggregateNotFoundExceptionData,AggregateVersionConflictExceptionData
public abstract class AbstractAggregateExceptionData<EX extends org.fuin.ddd4j.core.AbstractAggregateException>
extends Object
implements org.fuin.ddd4j.core.ExceptionData<EX>
Base class for storing the data from a
AbstractAggregateException 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.AbstractAggregateExceptionData(org.fuin.ddd4j.core.AbstractAggregateException ex) Constructor with exception. -
Method Summary
Methods 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
-
AbstractAggregateExceptionData
protected AbstractAggregateExceptionData()Constructor only for marshalling/unmarshalling. -
AbstractAggregateExceptionData
public AbstractAggregateExceptionData(org.fuin.ddd4j.core.AbstractAggregateException ex) Constructor with exception.- Parameters:
ex- Exception to copy data from.
-
-
Method Details
-
getMessage
Returns the exception message.- Returns:
- Message.
-
getAggregateType
Returns the type of the aggregate.- Returns:
- Aggregate type.
-
getAggregateId
Returns the unique aggregate identifier.- Returns:
- Aggregate ID.
-