Interface Entity<M extends Entity<M,T>,T>
- All Known Subinterfaces:
AggregateRoot<T>
- All Known Implementing Classes:
DelegatingAggregateRoot,ImmutableAggregateRoot,ImmutableEntity,ModifiableAggregateRoot,ModifiableEntity,NoOpAggregateRoot,NoOpEntity,ReadOnlyAggregateRoot
public interface Entity<M extends Entity<M,T>,T>
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptiondefault Mdefault Mdefault Mdefault Mapply(Collection<?> events) default MassertAndApply(Object payload) default MassertAndApply(Object payload, Metadata metadata) assertLegal(Object command) assertThat(Entity.Validator<T, E> validator) Collection<? extends Entity<?,?>> entities()get()id()Entity<?,?> parent()possibleTargets(Object payload) default Entity<?,?> root()type()
-
Method Details
-
id
Object id() -
type
-
get
T get() -
idProperty
String idProperty() -
parent
Entity<?,?> parent() -
root
-
entities
Collection<? extends Entity<?,?>> entities() -
allEntities
-
getEntity
-
apply
-
apply
-
apply
-
apply
-
apply
-
assertLegal
- Throws:
E extends Exception
-
assertThat
- Throws:
E extends Exception
-
ensure
- Throws:
E extends Exception
-
assertAndApply
-
assertAndApply
-
possibleTargets
-