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 TypeMethodDescriptionvoidadd(RootAggregateChange<T> aggregateChange) Adds aMutableAggregateChangeinto thisBatchingAggregateChange.voidforEachAction(Consumer<? super DbAction<?>> consumer) Applies the given consumer to eachDbActionin thisAggregateChange.The type of the root of thisAggregateChange.getKind()Returns theAggregateChange.KindofAggregateChangethis is.
-
Method Details
-
getKind
Description copied from interface:AggregateChangeReturns theAggregateChange.KindofAggregateChangethis is.- Specified by:
getKindin interfaceAggregateChange<T>- Returns:
- guaranteed to be not null.
-
getEntityType
Description copied from interface:AggregateChangeThe type of the root of thisAggregateChange.- Specified by:
getEntityTypein interfaceAggregateChange<T>- Returns:
- Guaranteed to be not null.
-
forEachAction
Description copied from interface:AggregateChangeApplies the given consumer to eachDbActionin thisAggregateChange.- Specified by:
forEachActionin interfaceAggregateChange<T>- Parameters:
consumer- must not be null.
-
add
Description copied from interface:BatchingAggregateChangeAdds aMutableAggregateChangeinto thisBatchingAggregateChange.- Specified by:
addin interfaceBatchingAggregateChange<T,RootAggregateChange<T>> - Parameters:
aggregateChange- must not be null.
-