Class SaveBatchingAggregateChange<T>
java.lang.Object
org.springframework.data.relational.core.conversion.SaveBatchingAggregateChange<T>
- All Implemented Interfaces:
AggregateChange<T>
,BatchingAggregateChange<T,
RootAggregateChange<T>>
public class SaveBatchingAggregateChange<T>
extends Object
implements BatchingAggregateChange<T,RootAggregateChange<T>>
A
BatchingAggregateChange
implementation for save changes that can contain actions for any mix of insert and
update operations. When consumed, actions are yielded in the appropriate entity tree order with inserts carried out
from root to leaves and deletes in reverse. All operations that can be batched are grouped and combined to offer the
ability for an optimized batch operation to be used.- Since:
- 3.0
- Author:
- Chirag Tailor
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.data.relational.core.conversion.AggregateChange
AggregateChange.Kind
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(RootAggregateChange<T> aggregateChange) Adds aMutableAggregateChange
into thisBatchingAggregateChange
.void
forEachAction
(Consumer<? super DbAction<?>> consumer) Applies the given consumer to eachDbAction
in thisAggregateChange
.The type of the root of thisAggregateChange
.getKind()
Returns theAggregateChange.Kind
ofAggregateChange
this is.
-
Method Details
-
getKind
Description copied from interface:AggregateChange
Returns theAggregateChange.Kind
ofAggregateChange
this is.- Specified by:
getKind
in interfaceAggregateChange<T>
- Returns:
- guaranteed to be not null.
-
getEntityType
Description copied from interface:AggregateChange
The type of the root of thisAggregateChange
.- Specified by:
getEntityType
in interfaceAggregateChange<T>
- Returns:
- Guaranteed to be not null.
-
forEachAction
Description copied from interface:AggregateChange
Applies the given consumer to eachDbAction
in thisAggregateChange
.- Specified by:
forEachAction
in interfaceAggregateChange<T>
- Parameters:
consumer
- must not be null.
-
add
Description copied from interface:BatchingAggregateChange
Adds aMutableAggregateChange
into thisBatchingAggregateChange
.- Specified by:
add
in interfaceBatchingAggregateChange<T,
RootAggregateChange<T>> - Parameters:
aggregateChange
- must not be null.
-