java.lang.Object
java.lang.Throwable
java.lang.Exception
org.fuin.ddd4j.core.AbstractAggregateException
org.fuin.ddd4j.core.AbstractVersionedAggregateException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
AggregateAlreadyExistsException,AggregateVersionNotFoundException
Base class for version related aggregate exceptions.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractVersionedAggregateException(@NotEmpty String message, @NotNull String type, @NotNull String id, int version) Constructor with string data.AbstractVersionedAggregateException(@NotEmpty String message, @NotNull EntityType type, @NotNull AggregateRootId id, int version) Constructor with strongly typed data. -
Method Summary
Methods inherited from class org.fuin.ddd4j.core.AbstractAggregateException
getId, getTypeMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
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.
-