@@ -1435,7 +1435,7 @@ protected final CompletionStage<T> doLoad(Object id, LoadEventListener.LoadType
1435
1435
}
1436
1436
1437
1437
private class ReactiveMultiIdentifierLoadAccessImpl <T > implements MultiIdLoadOptions {
1438
- private final EntityPersister entityPersister ;
1438
+ private final ReactiveEntityPersister entityPersister ;
1439
1439
1440
1440
private LockOptions lockOptions ;
1441
1441
private CacheMode cacheMode ;
@@ -1450,7 +1450,7 @@ private class ReactiveMultiIdentifierLoadAccessImpl<T> implements MultiIdLoadOpt
1450
1450
private boolean readOnly ;
1451
1451
1452
1452
public ReactiveMultiIdentifierLoadAccessImpl (EntityPersister entityPersister ) {
1453
- this .entityPersister = entityPersister ;
1453
+ this .entityPersister = ( ReactiveEntityPersister ) entityPersister ;
1454
1454
}
1455
1455
1456
1456
@ Override
@@ -1489,12 +1489,7 @@ public Integer getBatchSize() {
1489
1489
}
1490
1490
1491
1491
public ReactiveMultiIdentifierLoadAccessImpl <T > withBatchSize (int batchSize ) {
1492
- if ( batchSize < 1 ) {
1493
- this .batchSize = null ;
1494
- }
1495
- else {
1496
- this .batchSize = batchSize ;
1497
- }
1492
+ this .batchSize = batchSize < 1 ? null : batchSize ;
1498
1493
return this ;
1499
1494
}
1500
1495
@@ -1537,8 +1532,11 @@ public CompletionStage<List<T>> multiLoad(Object... ids) {
1537
1532
Object [] sids = new Object [ids .length ];
1538
1533
System .arraycopy ( ids , 0 , sids , 0 , ids .length );
1539
1534
1540
- return perform ( () -> (CompletionStage ) ( (ReactiveEntityPersister ) entityPersister )
1541
- .reactiveMultiLoad ( sids , ReactiveSessionImpl .this , this ) );
1535
+ return perform ( () -> {
1536
+ final CompletionStage <? extends List <?>> stage =
1537
+ entityPersister .reactiveMultiLoad ( sids , ReactiveSessionImpl .this , this );
1538
+ return (CompletionStage <List <T >>) stage ;
1539
+ });
1542
1540
}
1543
1541
1544
1542
public CompletionStage <List <T >> perform (Supplier <CompletionStage <List <T >>> executor ) {
@@ -1572,12 +1570,6 @@ public CompletionStage<List<T>> perform(Supplier<CompletionStage<List<T>>> execu
1572
1570
}
1573
1571
} );
1574
1572
}
1575
-
1576
- @ SuppressWarnings ("unchecked" )
1577
- public <K extends Object > CompletionStage <List <T >> multiLoad (List <K > ids ) {
1578
- return perform ( () -> (CompletionStage <List <T >>)
1579
- entityPersister .multiLoad ( ids .toArray ( new Object [0 ] ), ReactiveSessionImpl .this , this ) );
1580
- }
1581
1573
}
1582
1574
1583
1575
private class NaturalIdLoadAccessImpl <T > {
0 commit comments