@@ -440,10 +440,18 @@ static abstract class PreparedOperationSupport<T> implements PreparedOperation<T
440
440
441
441
private Function <String , String > sqlFilter = s -> s ;
442
442
private Function <Bindings , Bindings > bindingFilter = b -> b ;
443
+ private final Bindings bindings ;
444
+
445
+ protected PreparedOperationSupport (Bindings bindings ) {
446
+
447
+ this .bindings = bindings ;
448
+ }
443
449
444
450
abstract protected String createBaseSql ();
445
451
446
- protected abstract Bindings getBaseBinding ();
452
+ Bindings getBaseBinding () {
453
+ return bindings ;
454
+ };
447
455
448
456
/*
449
457
* (non-Javadoc)
@@ -500,12 +508,18 @@ public void addBindingFilter(Function<Bindings, Bindings> filter) {
500
508
*
501
509
* @param <T>
502
510
*/
503
- @ RequiredArgsConstructor
504
511
static class DefaultPreparedOperation <T > extends PreparedOperationSupport <T > {
505
512
506
513
private final T source ;
507
514
private final RenderContext renderContext ;
508
- private final Bindings bindings ;
515
+
516
+ DefaultPreparedOperation (T source , RenderContext renderContext , Bindings bindings ) {
517
+
518
+ super (bindings );
519
+
520
+ this .source = source ;
521
+ this .renderContext = renderContext ;
522
+ }
509
523
510
524
/*
511
525
* (non-Javadoc)
@@ -518,6 +532,7 @@ public T getSource() {
518
532
519
533
@ Override
520
534
protected String createBaseSql () {
535
+
521
536
SqlRenderer sqlRenderer = SqlRenderer .create (renderContext );
522
537
523
538
if (this .source instanceof Select ) {
@@ -539,9 +554,5 @@ protected String createBaseSql() {
539
554
throw new IllegalStateException ("Cannot render " + this .getSource ());
540
555
}
541
556
542
- @ Override
543
- protected Bindings getBaseBinding () {
544
- return bindings ;
545
- }
546
557
}
547
558
}
0 commit comments