Class AggregateVersionConflictException

    • Field Detail

      • ELEMENT_NAME

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

      • AggregateVersionConflictException

        public AggregateVersionConflictException​(@NotNull
                                                 @NotNull EntityType aggregateType,
                                                 @NotNull
                                                 @NotNull AggregateRootId aggregateId,
                                                 int expected,
                                                 int actual)
        Constructor with all data.
        Parameters:
        aggregateType - Type of the aggregate.
        aggregateId - Unique identifier of the aggregate.
        expected - Expected version.
        actual - Actual version.
    • Method Detail

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

        public final int getExpected()
        Returns the expected version.
        Returns:
        Expected version.
      • getActual

        public final int getActual()
        Returns the actual version.
        Returns:
        Actual version.