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 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.