Class AbstractVersionedAggregateException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AggregateAlreadyExistsException, AggregateVersionNotFoundException

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

    • AbstractVersionedAggregateException

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

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

    • getVersion

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