Class ModifiableAggregateRoot<T>
java.lang.Object
io.fluxcapacitor.javaclient.modeling.DelegatingEntity<T>
io.fluxcapacitor.javaclient.modeling.ModifiableAggregateRoot<T>
- All Implemented Interfaces:
Entity<T>
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface io.fluxcapacitor.javaclient.modeling.Entity
Entity.Validator<T,E extends Exception> -
Field Summary
Fields inherited from class io.fluxcapacitor.javaclient.modeling.DelegatingEntity
delegateFields inherited from interface io.fluxcapacitor.javaclient.modeling.Entity
AGGREGATE_ID_METADATA_KEY, AGGREGATE_SN_METADATA_KEY, AGGREGATE_TYPE_METADATA_KEY, loading -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedModifiableAggregateRoot(ImmutableEntity<T> delegate, boolean commitInBatch, EventPublication eventPublication, Serializer serializer, DispatchInterceptor dispatchInterceptor, ModifiableAggregateRoot.CommitHandler commitHandler) -
Method Summary
Modifier and TypeMethodDescriptionprotected ModifiableAggregateRoot<T>assertAndApply(Object payloadOrMessage) <E extends Exception>
ModifiableAggregateRoot<T>assertLegal(Object command) protected voidcommit()Collection<? extends Entity<?>>entities()static <T> Optional<ModifiableAggregateRoot<T>>getIfActive(Object aggregateId) protected voidhandleUpdate(UnaryOperator<Entity<T>> update) static <T> ModifiableAggregateRoot<T>load(Object aggregateId, Supplier<ImmutableEntity<T>> loader, boolean commitInBatch, EventPublication eventPublication, Serializer serializer, DispatchInterceptor dispatchInterceptor, ModifiableAggregateRoot.CommitHandler commitHandler) previous()update(UnaryOperator<T> function) protected voidwhenHandlerCompletes(Throwable error) Methods inherited from class io.fluxcapacitor.javaclient.modeling.DelegatingEntity
aliases, get, id, idProperty, lastEventId, lastEventIndex, parent, sequenceNumber, timestamp, typeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.fluxcapacitor.javaclient.modeling.Entity
allEntities, ancestorValue, apply, apply, apply, apply, assertAndApply, assertAndApply, assertAndApply, assertThat, associations, dissociations, ensure, getEntity, ifPresent, isEmpty, isPresent, isRoot, makeReadOnly, mapIfPresent, playBackToCondition, playBackToEvent, possibleTargets, relationships, root, rootAnnotation
-
Constructor Details
-
ModifiableAggregateRoot
protected ModifiableAggregateRoot(ImmutableEntity<T> delegate, boolean commitInBatch, EventPublication eventPublication, Serializer serializer, DispatchInterceptor dispatchInterceptor, ModifiableAggregateRoot.CommitHandler commitHandler)
-
-
Method Details
-
getIfActive
-
load
public static <T> ModifiableAggregateRoot<T> load(Object aggregateId, Supplier<ImmutableEntity<T>> loader, boolean commitInBatch, EventPublication eventPublication, Serializer serializer, DispatchInterceptor dispatchInterceptor, ModifiableAggregateRoot.CommitHandler commitHandler) -
assertLegal
- Throws:
E extends Exception
-
assertAndApply
-
apply
-
apply
-
update
-
entities
-
previous
-
handleUpdate
-
whenHandlerCompletes
-
commit
protected void commit()
-