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) |
AggregateDelete<T> |
delete() |
AggregateDelete<T> |
delete(UUID aggregateId) |
boolean |
exists(UUID aggregateId)
Check if an aggregate exists.
|
boolean |
exists(UUID aggregateId,
UUID tenantId)
Check if an aggregate exists for the given tenant.
|
void |
save(AggregateRequest request)
Save or append events to an aggregate according to the given request
|
void |
update(String aggregateId,
AggregateUpdate<T> update)
Update the aggregate.
|
void |
update(UUID aggregateId,
AggregateUpdate<T> update)
Update the aggregate.
|
void |
update(UUID aggregateId,
UUID tenantId,
AggregateUpdate<T> update) |
public static <T> AggregateClient.Builder<T> aggregateClient(String aggregateType, Class<T> stateClass, SerializedClientConfig config)
public void save(AggregateRequest request)
request - the request to performpublic void update(UUID aggregateId, UUID tenantId, AggregateUpdate<T> update)
public void update(String aggregateId, AggregateUpdate<T> update)
The update will be performed using optimistic concurrency check depending on the
useOptimisticConcurrencyOnUpdate configuration flag.
aggregateId - The ID of the aggregate.update - Function that executes business logic and returns the resulting domain events.public void update(UUID aggregateId, AggregateUpdate<T> update)
The update will be performed using optimistic concurrency check depending on the
useOptimisticConcurrencyOnUpdate configuration flag.
aggregateId - The ID of the aggregate.update - Function that executes business logic and returns the resulting domain events.public AggregateDelete<T> delete()
public AggregateDelete<T> delete(UUID aggregateId)
public boolean exists(UUID aggregateId)
Copyright © 2019. All rights reserved.