public class AggregateClient<T> extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
AggregateClient.Builder<T> |
| Modifier and Type | Method and Description |
|---|---|
static <T> AggregateClient.Builder<T> |
aggregateClient(String aggregateType,
Class<T> stateClass,
SerializedClientConfig config) |
AggregateDeleteConfirmation |
delete(AggregateDelete delete)
Deletes all aggregate instances for current type or a single aggregate instance by its ID.
|
boolean |
exists(AggregateExists exists)
Check if an aggregate exists.
|
void |
save(AggregateRequest request)
Save or append events to an aggregate according to the given request
|
int |
update(String aggregateId,
AggregateUpdate<T> update)
Update the aggregate.
|
int |
update(UUID aggregateId,
AggregateUpdate<T> update)
Update the aggregate.
|
public static <T> AggregateClient.Builder<T> aggregateClient(String aggregateType, Class<T> stateClass, SerializedClientConfig config)
public void save(AggregateRequest request)
request - the request to performpublic int update(String aggregateId, AggregateUpdate<T> update)
The update will be performed using optimistic concurrency check depending on the
AggregateUpdate.useOptimisticConcurrencyOnUpdate() setting.
aggregateId - The ID of the aggregate.update - Function that executes business logic and returns the resulting domain events.public int update(UUID aggregateId, AggregateUpdate<T> update)
The update will be performed using optimistic concurrency check depending on the
AggregateUpdate.useOptimisticConcurrencyOnUpdate() setting.
aggregateId - The ID of the aggregate.update - Function that executes business logic and returns the resulting domain events.public AggregateDeleteConfirmation delete(AggregateDelete delete)
delete - RequestAggregateDeleteConfirmation.confirm()public boolean exists(AggregateExists exists)
exists - RequestCopyright © 2021. All rights reserved.