Class AggregateVersionNotFoundException

java.lang.Object
java.lang.Throwable
java.lang.Exception
org.fuin.ddd4j.ddd.AggregateVersionNotFoundException
All Implemented Interfaces:
Serializable, org.fuin.objects4j.common.ExceptionShortIdentifable, org.fuin.objects4j.common.MarshalInformation<AggregateVersionNotFoundException.Data>

public final class AggregateVersionNotFoundException extends Exception implements org.fuin.objects4j.common.ExceptionShortIdentifable, org.fuin.objects4j.common.MarshalInformation<AggregateVersionNotFoundException.Data>
Signals that the requested version for an aggregate does not exist.
See Also:
  • Field Details

    • SHORT_ID

      public static final String SHORT_ID
      Unique short identifier of this exception.
      See Also:
    • ELEMENT_NAME

      public static final String ELEMENT_NAME
      Unique name of the element to use for XML and JSON marshalling/unmarshalling.
      See Also:
  • Constructor Details

    • AggregateVersionNotFoundException

      public AggregateVersionNotFoundException(@NotNull @NotNull EntityType aggregateType, @NotNull @NotNull AggregateRootId aggregateId, int version)
      Constructor with all data.
      Parameters:
      aggregateType - Type of the aggregate.
      aggregateId - Unique identifier of the aggregate.
      version - Requested version.
  • Method Details

    • getShortId

      public final String getShortId()
      Specified by:
      getShortId in interface org.fuin.objects4j.common.ExceptionShortIdentifable
    • getAggregateType

      @NotNull public final @NotNull String getAggregateType()
      Returns the type of the aggregate.
      Returns:
      Type.
    • getAggregateId

      @NotNull public final @NotNull String getAggregateId()
      Returns the unique identifier of the aggregate.
      Returns:
      Stream with version conflict.
    • getVersion

      public final int getVersion()
      Returns the actual version.
      Returns:
      Actual version.
    • getData

      Returns the exception specific data.
      Specified by:
      getData in interface org.fuin.objects4j.common.MarshalInformation<AggregateVersionNotFoundException.Data>
      Returns:
      Data structure that can be marshalled/unmarshalled.
    • getDataClass

      Specified by:
      getDataClass in interface org.fuin.objects4j.common.MarshalInformation<AggregateVersionNotFoundException.Data>
    • getDataElement

      public String getDataElement()
      Specified by:
      getDataElement in interface org.fuin.objects4j.common.MarshalInformation<AggregateVersionNotFoundException.Data>