public class AggregateChange<T> extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
AggregateChange.Kind
The kind of action to be performed on an aggregate.
|
| Constructor and Description |
|---|
AggregateChange(AggregateChange.Kind kind,
Class<T> entityType,
T entity) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAction(DbAction<?> action) |
void |
executeWith(Interpreter interpreter,
RelationalMappingContext context,
RelationalConverter converter) |
static <T> AggregateChange<T> |
forDelete(Class<T> entityClass,
T entity)
Factory method to create an
AggregateChange for deleting entities. |
static <T> AggregateChange<T> |
forDelete(T entity)
Factory method to create an
AggregateChange for deleting entities. |
static <T> AggregateChange<T> |
forSave(T entity)
Factory method to create an
AggregateChange for saving entities. |
List<DbAction<?>> |
getActions() |
T |
getEntity()
Aggregate root, to which the change applies, if available
|
Class<T> |
getEntityType()
Type of the aggregate root to be changed
|
AggregateChange.Kind |
getKind() |
void |
setEntity(T aggregateRoot) |
public AggregateChange(AggregateChange.Kind kind, Class<T> entityType, @Nullable T entity)
public static <T> AggregateChange<T> forSave(T entity)
AggregateChange for saving entities.T - entity type.entity - aggregate root to save.AggregateChange for saving the root entity.public static <T> AggregateChange<T> forDelete(T entity)
AggregateChange for deleting entities.T - entity type.entity - aggregate root to delete.AggregateChange for deleting the root entity.public static <T> AggregateChange<T> forDelete(Class<T> entityClass, @Nullable T entity)
AggregateChange for deleting entities.T - entity type.entityClass - aggregate root type.entity - aggregate root to delete.AggregateChange for deleting the root entity.public void executeWith(Interpreter interpreter, RelationalMappingContext context, RelationalConverter converter)
public void addAction(DbAction<?> action)
public AggregateChange.Kind getKind()
Copyright © 2017–2020 Pivotal Software, Inc.. All rights reserved.