Class AggregateNotFoundException

  • All Implemented Interfaces:
    Serializable, org.fuin.objects4j.common.ExceptionShortIdentifable, org.fuin.objects4j.common.MarshalInformation<AggregateNotFoundException.Data>

    public final class AggregateNotFoundException
    extends Exception
    implements org.fuin.objects4j.common.ExceptionShortIdentifable, org.fuin.objects4j.common.MarshalInformation<AggregateNotFoundException.Data>
    Signals that an aggregate of a given type and identifier was not found in the repository.
    See Also:
    Serialized Form
    • 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

      • AggregateNotFoundException

        public AggregateNotFoundException​(@NotNull
                                          @NotNull EntityType aggregateType,
                                          @NotNull
                                          @NotNull AggregateRootId aggregateId)
        Constructor with all data.
        Parameters:
        aggregateType - Type of the aggregate.
        aggregateId - Unique identifier of the aggregate.
    • 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.