3939import org .springframework .data .jdbc .core .convert .JdbcConverter ;
4040import org .springframework .data .mapping .PersistentPropertyPath ;
4141import org .springframework .data .mapping .PersistentPropertyPaths ;
42+ import org .springframework .data .relational .core .conversion .AggregateChangeWithRoot ;
4243import org .springframework .data .relational .core .conversion .DbAction ;
4344import org .springframework .data .relational .core .conversion .IdValueSource ;
4445import org .springframework .data .relational .core .conversion .MutableAggregateChange ;
@@ -70,7 +71,7 @@ public class AggregateChangeIdGenerationImmutableUnitTests {
7071
7172 RelationalMappingContext context = new RelationalMappingContext ();
7273 JdbcConverter converter = mock (JdbcConverter .class );
73- DbAction .WithEntity <? > rootInsert = new DbAction .InsertRoot <>(entity , IdValueSource .GENERATED );
74+ DbAction .WithRoot < DummyEntity > rootInsert = new DbAction .InsertRoot <>(entity , IdValueSource .GENERATED );
7475
7576 DataAccessStrategy accessStrategy = mock (DataAccessStrategy .class );
7677
@@ -79,8 +80,8 @@ public class AggregateChangeIdGenerationImmutableUnitTests {
7980 @ Test // DATAJDBC-291
8081 public void singleRoot () {
8182
82- MutableAggregateChange <DummyEntity > aggregateChange = MutableAggregateChange .forSave (entity );
83- aggregateChange .addAction (rootInsert );
83+ AggregateChangeWithRoot <DummyEntity > aggregateChange = MutableAggregateChange .forSave (entity );
84+ aggregateChange .setRootAction (rootInsert );
8485
8586 entity = executor .execute (aggregateChange );
8687
@@ -92,8 +93,8 @@ public void simpleReference() {
9293
9394 entity = entity .withSingle (content );
9495
95- MutableAggregateChange <DummyEntity > aggregateChange = MutableAggregateChange .forSave (entity );
96- aggregateChange .addAction (rootInsert );
96+ AggregateChangeWithRoot <DummyEntity > aggregateChange = MutableAggregateChange .forSave (entity );
97+ aggregateChange .setRootAction (rootInsert );
9798 aggregateChange .addAction (createInsert ("single" , content , null ));
9899
99100 entity = executor .execute (aggregateChange );
@@ -110,8 +111,8 @@ public void listReference() {
110111
111112 entity = entity .withContentList (asList (content , content2 ));
112113
113- MutableAggregateChange <DummyEntity > aggregateChange = MutableAggregateChange .forSave (entity );
114- aggregateChange .addAction (rootInsert );
114+ AggregateChangeWithRoot <DummyEntity > aggregateChange = MutableAggregateChange .forSave (entity );
115+ aggregateChange .setRootAction (rootInsert );
115116 aggregateChange .addAction (createInsert ("contentList" , content , 0 ));
116117 aggregateChange .addAction (createInsert ("contentList" , content2 , 1 ));
117118
@@ -129,8 +130,8 @@ public void mapReference() {
129130
130131 entity = entity .withContentMap (createContentMap ("a" , content , "b" , content2 ));
131132
132- MutableAggregateChange <DummyEntity > aggregateChange = MutableAggregateChange .forSave (entity );
133- aggregateChange .addAction (rootInsert );
133+ AggregateChangeWithRoot <DummyEntity > aggregateChange = MutableAggregateChange .forSave (entity );
134+ aggregateChange .setRootAction (rootInsert );
134135 aggregateChange .addAction (createInsert ("contentMap" , content , "a" ));
135136 aggregateChange .addAction (createInsert ("contentMap" , content2 , "b" ));
136137
@@ -149,8 +150,8 @@ public void setIdForDeepReference() {
149150 DbAction .Insert <?> parentInsert = createInsert ("single" , content , null );
150151 DbAction .Insert <?> insert = createDeepInsert ("single" , tag1 , null , parentInsert );
151152
152- MutableAggregateChange <DummyEntity > aggregateChange = MutableAggregateChange .forSave (entity );
153- aggregateChange .addAction (rootInsert );
153+ AggregateChangeWithRoot <DummyEntity > aggregateChange = MutableAggregateChange .forSave (entity );
154+ aggregateChange .setRootAction (rootInsert );
154155 aggregateChange .addAction (parentInsert );
155156 aggregateChange .addAction (insert );
156157
@@ -171,8 +172,8 @@ public void setIdForDeepReferenceElementList() {
171172 DbAction .Insert <?> insert1 = createDeepInsert ("tagList" , tag1 , 0 , parentInsert );
172173 DbAction .Insert <?> insert2 = createDeepInsert ("tagList" , tag2 , 1 , parentInsert );
173174
174- MutableAggregateChange <DummyEntity > aggregateChange = MutableAggregateChange .forSave (entity );
175- aggregateChange .addAction (rootInsert );
175+ AggregateChangeWithRoot <DummyEntity > aggregateChange = MutableAggregateChange .forSave (entity );
176+ aggregateChange .setRootAction (rootInsert );
176177 aggregateChange .addAction (parentInsert );
177178 aggregateChange .addAction (insert1 );
178179 aggregateChange .addAction (insert2 );
@@ -197,8 +198,8 @@ public void setIdForDeepElementSetElementSet() {
197198 DbAction .Insert <?> insert1 = createDeepInsert ("tagSet" , tag1 , null , parentInsert );
198199 DbAction .Insert <?> insert2 = createDeepInsert ("tagSet" , tag2 , null , parentInsert );
199200
200- MutableAggregateChange <DummyEntity > aggregateChange = MutableAggregateChange .forSave (entity );
201- aggregateChange .addAction (rootInsert );
201+ AggregateChangeWithRoot <DummyEntity > aggregateChange = MutableAggregateChange .forSave (entity );
202+ aggregateChange .setRootAction (rootInsert );
202203 aggregateChange .addAction (parentInsert );
203204 aggregateChange .addAction (insert1 );
204205 aggregateChange .addAction (insert2 );
@@ -230,8 +231,8 @@ public void setIdForDeepElementListSingleReference() {
230231 DbAction .Insert <?> insert1 = createDeepInsert ("single" , tag1 , null , parentInsert1 );
231232 DbAction .Insert <?> insert2 = createDeepInsert ("single" , tag2 , null , parentInsert2 );
232233
233- MutableAggregateChange <DummyEntity > aggregateChange = MutableAggregateChange .forSave (entity );
234- aggregateChange .addAction (rootInsert );
234+ AggregateChangeWithRoot <DummyEntity > aggregateChange = MutableAggregateChange .forSave (entity );
235+ aggregateChange .setRootAction (rootInsert );
235236 aggregateChange .addAction (parentInsert1 );
236237 aggregateChange .addAction (parentInsert2 );
237238 aggregateChange .addAction (insert1 );
@@ -261,8 +262,8 @@ public void setIdForDeepElementListElementList() {
261262 DbAction .Insert <?> insert2 = createDeepInsert ("tagList" , tag2 , 0 , parentInsert2 );
262263 DbAction .Insert <?> insert3 = createDeepInsert ("tagList" , tag3 , 1 , parentInsert2 );
263264
264- MutableAggregateChange <DummyEntity > aggregateChange = MutableAggregateChange .forSave (entity );
265- aggregateChange .addAction (rootInsert );
265+ AggregateChangeWithRoot <DummyEntity > aggregateChange = MutableAggregateChange .forSave (entity );
266+ aggregateChange .setRootAction (rootInsert );
266267 aggregateChange .addAction (parentInsert1 );
267268 aggregateChange .addAction (parentInsert2 );
268269 aggregateChange .addAction (insert1 );
@@ -296,8 +297,8 @@ public void setIdForDeepElementMapElementMap() {
296297 DbAction .Insert <?> insert2 = createDeepInsert ("tagMap" , tag2 , "222" , parentInsert2 );
297298 DbAction .Insert <?> insert3 = createDeepInsert ("tagMap" , tag3 , "333" , parentInsert2 );
298299
299- MutableAggregateChange <DummyEntity > aggregateChange = MutableAggregateChange .forSave (entity );
300- aggregateChange .addAction (rootInsert );
300+ AggregateChangeWithRoot <DummyEntity > aggregateChange = MutableAggregateChange .forSave (entity );
301+ aggregateChange .setRootAction (rootInsert );
301302 aggregateChange .addAction (parentInsert1 );
302303 aggregateChange .addAction (parentInsert2 );
303304 aggregateChange .addAction (insert1 );
@@ -335,8 +336,8 @@ public void setIdForDeepElementListSingleReferenceWithIntermittentNoId() {
335336 DbAction .Insert <?> insert1 = createDeepInsert ("single" , tag1 , null , parentInsert1 );
336337 DbAction .Insert <?> insert2 = createDeepInsert ("single" , tag2 , null , parentInsert2 );
337338
338- MutableAggregateChange <DummyEntity > aggregateChange = MutableAggregateChange .forSave (entity );
339- aggregateChange .addAction (rootInsert );
339+ AggregateChangeWithRoot <DummyEntity > aggregateChange = MutableAggregateChange .forSave (entity );
340+ aggregateChange .setRootAction (rootInsert );
340341 aggregateChange .addAction (parentInsert1 );
341342 aggregateChange .addAction (parentInsert2 );
342343 aggregateChange .addAction (insert1 );
@@ -361,8 +362,8 @@ public void setIdForEmbeddedDeepReference() {
361362
362363 DbAction .Insert <?> parentInsert = createInsert ("embedded.single" , tag1 , null );
363364
364- MutableAggregateChange <DummyEntity > aggregateChange = MutableAggregateChange .forSave (entity );
365- aggregateChange .addAction (rootInsert );
365+ AggregateChangeWithRoot <DummyEntity > aggregateChange = MutableAggregateChange .forSave (entity );
366+ aggregateChange .setRootAction (rootInsert );
366367 aggregateChange .addAction (parentInsert );
367368
368369 entity = executor .execute (aggregateChange );
0 commit comments