Class AbstractAggregateException

java.lang.Object
java.lang.Throwable
java.lang.Exception
org.fuin.ddd4j.core.AbstractAggregateException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AbstractVersionedAggregateException, AggregateDeletedException, AggregateNotFoundException, AggregateVersionConflictException

public abstract class AbstractAggregateException extends Exception
Base class for aggregate related exceptions.
See Also:
  • Constructor Details

    • AbstractAggregateException

      public AbstractAggregateException(@NotEmpty @NotEmpty String message, @NotNull @NotNull EntityType type, @NotNull @NotNull AggregateRootId id)
      Constructor with strongly typed data.
      Parameters:
      message - Error message.
      type - Type of the aggregate.
      id - Unique identifier of the aggregate.
    • AbstractAggregateException

      public AbstractAggregateException(@NotEmpty @NotEmpty String message, @NotEmpty @NotEmpty String type, @NotEmpty @NotEmpty String id)
      Constructor with string data.
      Parameters:
      message - Error message.
      type - Type of the aggregate.
      id - Unique identifier of the aggregate.
  • Method Details

    • getType

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

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