Uses of Interface
io.fluxcapacitor.javaclient.modeling.Entity
Packages that use Entity
Package
Description
-
Uses of Entity in io.fluxcapacitor.javaclient
Methods in io.fluxcapacitor.javaclient that return EntityModifier and TypeMethodDescriptionstatic <T> Entity
<T> FluxCapacitor.asEntity
(T value) Returns an Entity containing given value.static <T> Entity
<T> FluxCapacitor.loadAggregate
(Id<T> aggregateId) Loads the aggregate root of type<T>
with given aggregateId.static <T> Entity
<T> FluxCapacitor.loadAggregate
(Object aggregateId, Class<T> aggregateType) Loads the aggregate root of type<T>
with given aggregateId.static <T> Entity
<T> FluxCapacitor.loadAggregateFor
(Object entityId) Loads the aggregate root that currently contains the entity with given entityId.static <T> Entity
<T> FluxCapacitor.loadAggregateFor
(Object entityId, Class<?> defaultType) Loads the aggregate root of type<T>
that currently contains the entity with given entityId.static <T> Entity
<T> FluxCapacitor.loadEntity
(Id<T> entityId) Loads the entity with given id.static <T> Entity
<T> FluxCapacitor.loadEntity
(Object entityId) Loads the entity with given id. -
Uses of Entity in io.fluxcapacitor.javaclient.modeling
Subinterfaces of Entity in io.fluxcapacitor.javaclient.modelingModifier and TypeInterfaceDescriptioninterface
Represents the root of an aggregate in a domain model.Classes in io.fluxcapacitor.javaclient.modeling that implement EntityModifier and TypeClassDescriptionclass
A base implementation ofEntity
that forwards all method calls to a delegatedEntity
instance.class
Immutable representation of anAggregateRoot
, extendingImmutableEntity
with additional metadata for event sourcing.class
Immutable implementation of theEntity
interface, representing a snapshot of a domain entity.class
A lazily-loaded implementation ofAggregateRoot
that defers deserialization and event application until the entity value is explicitly accessed.class
A mutable, statefulAggregateRoot
implementation that allows in-place updates and applies events with commit support for persisting the state and synchronizing it with the Flux platform.class
A mutable view on a nested entity within aModifiableAggregateRoot
.class
NoOpEntity<T>
A read-only, inertEntity
wrapper used exclusively during the loading phase of aggregate state.class
A functional, non-persistentEntity
wrapper that enables safe state mutation and validation without producing side effects such as event publication or snapshot creation.Fields in io.fluxcapacitor.javaclient.modeling declared as EntityMethods in io.fluxcapacitor.javaclient.modeling that return EntityModifier and TypeMethodDescriptionApplies the given message to the entity.Entity.apply
(DeserializingMessage eventMessage) Applies the given deserializing message to the entity.Processes the given event and applies the corresponding logic based on its type.Applies the given events to reconstruct or update the entity's state.Applies an event and associated metadata to produce a resulting entity.Entity.apply
(Collection<?> events) Applies a collection of events to the current entity, returning an updated entity.ImmutableAggregateRoot.apply
(DeserializingMessage message) ImmutableEntity.apply
(DeserializingMessage message) Entity.assertAndApply
(Object payloadOrMessage) Verifies that the provided update is legal given the current state of the aggregate and on success applies it to the aggregate.Entity.assertAndApply
(Object... updates) Applies a number of updates to the current entity after performing necessary legality assertions.Entity.assertAndApply
(Object payload, Metadata metadata) Verifies that the provided update is legal given the current state of the aggregate and on success applies it to the aggregate.Entity.assertAndApply
(Collection<?> updates) Applies a collection of updates sequentially to the current entity after asserting each is legal, and returns the resulting entity.ModifiableAggregateRoot.assertAndApply
(Object payloadOrMessage) ModifiableEntity.assertAndApply
(Object payloadOrMessage) Entity.assertLegal
(Object update) Verifies that the provided update is legal given the current state of the aggregate.ImmutableEntity.assertLegal
(Object update) LazyAggregateRoot.assertLegal
(Object update) ModifiableAggregateRoot.assertLegal
(Object update) ModifiableEntity.assertLegal
(Object update) SideEffectFreeEntity.assertLegal
(Object update) Entity.commit()
Commits the current state of the entity, persisting any changes made to it.ImmutableEntity.commit()
LazyAggregateRoot.commit()
ModifiableAggregateRoot.commit()
ModifiableEntity.commit()
NoOpEntity.commit()
SideEffectFreeEntity.commit()
Entity
<?> HasEntity.getEntity()
Retrieves the associated Entity of the object.LazyAggregateRoot.getLastCheckpoint()
protected Entity
<?> EntityParameterResolver.getMatchingEntity
(Object input, Parameter parameter) Attempts to retrieve anEntity
instance matching the given method parameter.ModifiableAggregateRoot.handleUpdate
(UnaryOperator<Entity<T>> update) Entity.ifPresent
(UnaryOperator<Entity<T>> action) Applies the specified action to this entity if it is present, returning the result of the action.static <T> Entity
<T> ModifiableAggregateRoot.load
(Object aggregateId, Supplier<Entity<T>> loader, boolean commitInBatch, EventPublication eventPublication, EventPublicationStrategy publicationStrategy, EntityHelper entityHelper, Serializer serializer, DispatchInterceptor dispatchInterceptor, ModifiableAggregateRoot.CommitHandler commitHandler) default Entity
<?> AggregateRoot.parent()
Entity
<?> DelegatingEntity.parent()
Entity
<?> Entity.parent()
Retrieves the parent entity of the current entity.Entity
<?> ModifiableEntity.parent()
Entity
<?> NoOpEntity.parent()
Entity
<?> SideEffectFreeEntity.parent()
Entity.playBackToEvent
(Long eventIndex, String eventId) Finds a version of this entity matching the given eventIndex or eventId.AggregateRoot.previous()
DelegatingEntity.previous()
Entity.previous()
Retrieves the previous version of this entity.LazyAggregateRoot.previous()
ModifiableAggregateRoot.previous()
ModifiableEntity.previous()
NoOpEntity.previous()
default Entity
<?> Entity.root()
Retrieves the root entity in the hierarchy.Entity.update
(UnaryOperator<T> function) Updates the current entity's value using the specified unary operator and returns a new entity containing the updated value.ImmutableAggregateRoot.update
(UnaryOperator<T> function) ImmutableEntity.update
(UnaryOperator<T> function) LazyAggregateRoot.update
(UnaryOperator<T> function) ModifiableAggregateRoot.update
(UnaryOperator<T> function) ModifiableEntity.update
(UnaryOperator<T> function) NoOpEntity.update
(UnaryOperator<T> function) AggregateRoot.withEventIndex
(Long index, String messageId) DelegatingEntity.withEventIndex
(Long index, String messageId) Entity.withEventIndex
(Long index, String messageId) Updates the event index and message ID of the entity and returns the updated version of the entity.ImmutableAggregateRoot.withEventIndex
(Long index, String messageId) LazyAggregateRoot.withEventIndex
(Long index, String messageId) AggregateRoot.withSequenceNumber
(long sequenceNumber) DelegatingEntity.withSequenceNumber
(long sequenceNumber) Entity.withSequenceNumber
(long sequenceNumber) Returns an updated entity based on this with the specified sequence number.ImmutableAggregateRoot.withSequenceNumber
(long sequenceNumber) LazyAggregateRoot.withSequenceNumber
(long sequenceNumber) Sets the type of the entity to the specified class and returns the updated entity.Methods in io.fluxcapacitor.javaclient.modeling that return types with arguments of type EntityModifier and TypeMethodDescriptionEntity.allEntities()
Retrieves a stream of all entities, including the current entity and all nested entities.Entity.ancestors()
Retrieves a list of the ancestor entities for the current entity.Collection
<? extends Entity<?>> DelegatingEntity.entities()
Collection
<? extends Entity<?>> Entity.entities()
Retrieves child entities of this entity.Collection
<? extends Entity<?>> LazyAggregateRoot.entities()
Collection
<? extends Entity<?>> ModifiableAggregateRoot.entities()
Collection
<? extends Entity<?>> ModifiableEntity.entities()
Collection
<? extends Entity<?>> NoOpEntity.entities()
Retrieves an entity based on the provided entity ID.Entity.playBackToCondition
(Predicate<Entity<T>> condition) Plays back through older versions of this entity until a specified condition is met.Entity.possibleTargets
(Object update) Determines the possible target entities for the given update.Methods in io.fluxcapacitor.javaclient.modeling with parameters of type EntityModifier and TypeMethodDescriptionDefaultEntityHelper.applyInvoker
(DeserializingMessage event, Entity<?> entity, boolean searchChildren) Finds a handler method annotated with@Apply
and wraps it to preserve apply context flags.default Optional
<HandlerInvoker> EntityHelper.applyInvoker
(DeserializingMessage message, Entity<?> entity) Returns an invoker that can apply the given event to the provided entity.EntityHelper.applyInvoker
(DeserializingMessage message, Entity<?> entity, boolean searchChildren) Returns an invoker for applying the event to the entity, optionally checking nested entities.<E extends Exception>
voidDefaultEntityHelper.assertLegal
(Object value, Entity<?> entity) Performs a validation check using@AssertLegal
handlers for the provided payload.<E extends Exception>
voidEntityHelper.assertLegal
(Object value, Entity<?> entity) Validates whether the given value results in a legal state transition for the specified entity.default Set
<Relationship> Entity.associations
(Entity<?> previous) Determines the set of new associations (relationships) that are present in the current entity but not in the provided previous entity.DefaultEntityHelper.checkLegality
(Object value, Entity<?> entity) Returns an exception if the value is illegal for the current entity, orOptional.empty()
if legal.EntityHelper.checkLegality
(Object value, Entity<?> entity) Checks if the given value would be considered legal for the specified entity.default Set
<Relationship> Entity.dissociations
(Entity<?> previous) Identifies and returns the set of relationships that are dissociated when compared to the relationships of the given previous entity.static <T> ImmutableAggregateRoot
<T> ImmutableAggregateRoot.from
(Entity<T> a, EntityHelper entityHelper, Serializer serializer, EventStore eventStore) Stream
<? extends ImmutableEntity<?>> AnnotatedEntityHolder.getEntities
(Entity<?> parent) Returns the set ofImmutableEntity
instances that are defined at the member location within the specified parent entity.void
ModifiableAggregateRoot.CommitHandler.handle
(Entity<?> model, List<AppliedEvent> unpublished, Entity<?> beforeUpdate) Stream
<?> Intercepts the given value using@InterceptApply
methods defined on the entity.Stream
<?> Intercepts the given value before it is applied to an entity.protected boolean
EntityParameterResolver.isAssignable
(Parameter parameter, Entity<?> entity) Returnstrue
if the entity or any of its parents match the expected parameter type.boolean
Convenience method that returnstrue
ifDefaultEntityHelper.checkLegality(java.lang.Object, io.fluxcapacitor.javaclient.modeling.Entity<?>)
yields no error.boolean
Returns whether the given value is considered legal for the specified entity.protected boolean
Returnstrue
if the entity or any of its parents match the expected parameter type.protected Supplier
<?> Returns aSupplier
that returns the entity if the entity or any of its parents match the expected parameter type.AnnotatedEntityHolder.updateOwner
(Object owner, Entity<?> before, Entity<?> after) Updates the parent object with the new state of a child entity.DefaultEntityHelper.MessageWithEntity.withEntity
(Entity<?> entity) Method parameters in io.fluxcapacitor.javaclient.modeling with type arguments of type EntityModifier and TypeMethodDescriptionModifiableAggregateRoot.handleUpdate
(UnaryOperator<Entity<T>> update) Entity.ifPresent
(UnaryOperator<Entity<T>> action) Applies the specified action to this entity if it is present, returning the result of the action.static <T> Entity
<T> ModifiableAggregateRoot.load
(Object aggregateId, Supplier<Entity<T>> loader, boolean commitInBatch, EventPublication eventPublication, EventPublicationStrategy publicationStrategy, EntityHelper entityHelper, Serializer serializer, DispatchInterceptor dispatchInterceptor, ModifiableAggregateRoot.CommitHandler commitHandler) default <U> Optional
<U> Entity.mapIfPresent
(Function<Entity<T>, U> action) Maps the entity to a new value if the entity is present.Entity.playBackToCondition
(Predicate<Entity<T>> condition) Plays back through older versions of this entity until a specified condition is met.Constructors in io.fluxcapacitor.javaclient.modeling with parameters of type EntityModifierConstructorDescriptionDelegatingEntity
(@NonNull Entity<T> delegate) DeserializingMessageWithEntity
(DeserializingMessage message, Entity<?> entity) MessageWithEntity
(Object payload, Entity<?> entity) protected
ModifiableAggregateRoot
(Entity<T> delegate, boolean commitInBatch, EventPublication eventPublication, EventPublicationStrategy publicationStrategy, EntityHelper entityHelper, Serializer serializer, DispatchInterceptor dispatchInterceptor, ModifiableAggregateRoot.CommitHandler commitHandler) ModifiableEntity
(Entity<T> delegate, ModifiableAggregateRoot<?> root) SideEffectFreeEntity
(Entity<T> delegate) -
Uses of Entity in io.fluxcapacitor.javaclient.persisting.eventsourcing
Methods in io.fluxcapacitor.javaclient.persisting.eventsourcing that return types with arguments of type EntityModifier and TypeMethodDescriptionDefaultSnapshotStore.getSnapshot
(Object aggregateId) NoOpSnapshotStore.getSnapshot
(Object aggregateId) SnapshotStore.getSnapshot
(Object aggregateId) Retrieves the most recent snapshot for a given aggregate ID, if available.Methods in io.fluxcapacitor.javaclient.persisting.eventsourcing with parameters of type EntityModifier and TypeMethodDescriptionboolean
NoSnapshotTrigger.shouldCreateSnapshot
(Entity<?> model, List<AppliedEvent> newEvents) Always returnsfalse
, indicating that a snapshot should never be created.boolean
PeriodicSnapshotTrigger.shouldCreateSnapshot
(Entity<?> model, List<AppliedEvent> newEvents) Determines whether a new snapshot should be created.boolean
SnapshotTrigger.shouldCreateSnapshot
(Entity<?> model, List<AppliedEvent> newEvents) Determines whether a snapshot should be created for the given aggregate state and recent events.<T> CompletableFuture
<Void> DefaultSnapshotStore.storeSnapshot
(Entity<T> snapshot) <T> CompletableFuture
<Void> NoOpSnapshotStore.storeSnapshot
(Entity<T> snapshot) <T> CompletableFuture
<Void> SnapshotStore.storeSnapshot
(Entity<T> snapshot) Stores a new snapshot for the given aggregate entity. -
Uses of Entity in io.fluxcapacitor.javaclient.persisting.repository
Methods in io.fluxcapacitor.javaclient.persisting.repository that return EntityModifier and TypeMethodDescription<T> Entity
<T> AggregateRepository.asEntity
(T entity) Wrap an existing aggregate instance into anEntity
, initializing tracking and identity information.<T> Entity
<T> CachingAggregateRepository.asEntity
(T entityId) <T> Entity
<T> DefaultAggregateRepository.asEntity
(T entityValue) DefaultAggregateRepository.AnnotatedAggregateRepository.eventSourceModel
(Entity<T> model) default <T> Entity
<T> Load an aggregate by a typed identifier.<T> Entity
<T> Load an aggregate by its identifier and type.<T> Entity
<T> <T> Entity
<T> <T> Entity
<T> Load the aggregate that owns the specified entity.<T> Entity
<T> <T> Entity
<T> DefaultAggregateRepository.AnnotatedAggregateRepository.loadSnapshot
(Object id) Methods in io.fluxcapacitor.javaclient.persisting.repository with parameters of type EntityModifier and TypeMethodDescriptionvoid
DefaultAggregateRepository.AnnotatedAggregateRepository.commit
(Entity<?> after, List<AppliedEvent> unpublishedEvents, Entity<?> before) DefaultAggregateRepository.AnnotatedAggregateRepository.eventSourceModel
(Entity<T> model) AggregateRepository.repairRelationships
(Entity<?> aggregate) Repairs the internal relationship model for a loaded aggregate.CachingAggregateRepository.repairRelationships
(Entity<?> aggregate) DefaultAggregateRepository.repairRelationships
(Entity<?> aggregate) protected void
CachingAggregateRepository.updateRelationships
(Entity<?> before, Entity<?> after)