@@ -640,7 +640,8 @@ public interface ReactiveQueryByExampleBuilderCustomizer<T> {
640
640
}
641
641
642
642
643
- private static class SingleEntityFetcher <T , R > extends QueryByExampleDataFetcher <T > implements SelfDescribingDataFetcher <R > {
643
+ private static class SingleEntityFetcher <T , R >
644
+ extends QueryByExampleDataFetcher <T > implements SelfDescribingDataFetcher <R > {
644
645
645
646
private final QueryByExampleExecutor <T > executor ;
646
647
@@ -657,6 +658,11 @@ private static class SingleEntityFetcher<T, R> extends QueryByExampleDataFetcher
657
658
this .sort = sort ;
658
659
}
659
660
661
+ @ Override
662
+ public ResolvableType getReturnType () {
663
+ return ResolvableType .forClass (this .resultType );
664
+ }
665
+
660
666
@ Override
661
667
@ SuppressWarnings ({"ConstantConditions" , "unchecked" })
662
668
public R get (DataFetchingEnvironment env ) throws BindException {
@@ -679,14 +685,11 @@ public R get(DataFetchingEnvironment env) throws BindException {
679
685
}).orElse (null );
680
686
}
681
687
682
- @ Override
683
- public ResolvableType getReturnType () {
684
- return ResolvableType .forClass (this .resultType );
685
- }
686
688
}
687
689
688
690
689
- private static class ManyEntityFetcher <T , R > extends QueryByExampleDataFetcher <T > implements SelfDescribingDataFetcher <Iterable <R >> {
691
+ private static class ManyEntityFetcher <T , R >
692
+ extends QueryByExampleDataFetcher <T > implements SelfDescribingDataFetcher <Iterable <R >> {
690
693
691
694
private final QueryByExampleExecutor <T > executor ;
692
695
@@ -704,6 +707,11 @@ private static class ManyEntityFetcher<T, R> extends QueryByExampleDataFetcher<T
704
707
this .sort = sort ;
705
708
}
706
709
710
+ @ Override
711
+ public ResolvableType getReturnType () {
712
+ return ResolvableType .forClassWithGenerics (Iterable .class , this .resultType );
713
+ }
714
+
707
715
@ Override
708
716
@ SuppressWarnings ("unchecked" )
709
717
public Iterable <R > get (DataFetchingEnvironment env ) throws BindException {
@@ -729,11 +737,6 @@ protected Iterable<R> getResult(FluentQuery.FetchableFluentQuery<R> queryToUse,
729
737
return queryToUse .all ();
730
738
}
731
739
732
- @ Override
733
- public ResolvableType getReturnType () {
734
- return ResolvableType .forClassWithGenerics (Iterable .class , this .resultType );
735
- }
736
-
737
740
}
738
741
739
742
@@ -760,6 +763,11 @@ private static class ScrollableEntityFetcher<T, R> extends ManyEntityFetcher<T,
760
763
this .scrollableResultType = ResolvableType .forClassWithGenerics (Window .class , resultType );
761
764
}
762
765
766
+ @ Override
767
+ public ResolvableType getReturnType () {
768
+ return ResolvableType .forClassWithGenerics (Iterable .class , this .scrollableResultType );
769
+ }
770
+
763
771
@ SuppressWarnings ("OptionalGetWithoutIsPresent" )
764
772
@ Override
765
773
protected Iterable <R > getResult (FluentQuery .FetchableFluentQuery <R > queryToUse , DataFetchingEnvironment env ) {
@@ -769,15 +777,11 @@ protected Iterable<R> getResult(FluentQuery.FetchableFluentQuery<R> queryToUse,
769
777
return queryToUse .limit (limit ).scroll (position );
770
778
}
771
779
772
- @ Override
773
- public ResolvableType getReturnType () {
774
- return ResolvableType .forClassWithGenerics (Iterable .class , this .scrollableResultType );
775
- }
776
-
777
780
}
778
781
779
782
780
- private static class ReactiveSingleEntityFetcher <T , R > extends QueryByExampleDataFetcher <T > implements SelfDescribingDataFetcher <Mono <R >> {
783
+ private static class ReactiveSingleEntityFetcher <T , R >
784
+ extends QueryByExampleDataFetcher <T > implements SelfDescribingDataFetcher <Mono <R >> {
781
785
782
786
private final ReactiveQueryByExampleExecutor <T > executor ;
783
787
@@ -795,6 +799,11 @@ private static class ReactiveSingleEntityFetcher<T, R> extends QueryByExampleDat
795
799
this .sort = sort ;
796
800
}
797
801
802
+ @ Override
803
+ public ResolvableType getReturnType () {
804
+ return ResolvableType .forClassWithGenerics (Mono .class , this .resultType );
805
+ }
806
+
798
807
@ Override
799
808
@ SuppressWarnings ("unchecked" )
800
809
public Mono <R > get (DataFetchingEnvironment env ) throws BindException {
@@ -816,15 +825,11 @@ public Mono<R> get(DataFetchingEnvironment env) throws BindException {
816
825
});
817
826
}
818
827
819
- @ Override
820
- public ResolvableType getReturnType () {
821
- return ResolvableType .forClassWithGenerics (Mono .class , this .resultType );
822
- }
823
-
824
828
}
825
829
826
830
827
- private static class ReactiveManyEntityFetcher <T , R > extends QueryByExampleDataFetcher <T > implements SelfDescribingDataFetcher <Flux <R >> {
831
+ private static class ReactiveManyEntityFetcher <T , R >
832
+ extends QueryByExampleDataFetcher <T > implements SelfDescribingDataFetcher <Flux <R >> {
828
833
829
834
private final ReactiveQueryByExampleExecutor <T > executor ;
830
835
@@ -842,6 +847,11 @@ private static class ReactiveManyEntityFetcher<T, R> extends QueryByExampleDataF
842
847
this .sort = sort ;
843
848
}
844
849
850
+ @ Override
851
+ public ResolvableType getReturnType () {
852
+ return ResolvableType .forClassWithGenerics (Flux .class , this .resultType );
853
+ }
854
+
845
855
@ Override
846
856
@ SuppressWarnings ("unchecked" )
847
857
public Flux <R > get (DataFetchingEnvironment env ) throws BindException {
@@ -863,15 +873,11 @@ public Flux<R> get(DataFetchingEnvironment env) throws BindException {
863
873
});
864
874
}
865
875
866
- @ Override
867
- public ResolvableType getReturnType () {
868
- return ResolvableType .forClassWithGenerics (Flux .class , this .resultType );
869
- }
870
-
871
876
}
872
877
873
878
874
- private static class ReactiveScrollableEntityFetcher <T , R > extends QueryByExampleDataFetcher <T > implements SelfDescribingDataFetcher <Mono <Iterable <R >>> {
879
+ private static class ReactiveScrollableEntityFetcher <T , R >
880
+ extends QueryByExampleDataFetcher <T > implements SelfDescribingDataFetcher <Mono <Iterable <R >>> {
875
881
876
882
private final ReactiveQueryByExampleExecutor <T > executor ;
877
883
@@ -901,6 +907,11 @@ private static class ReactiveScrollableEntityFetcher<T, R> extends QueryByExampl
901
907
this .sort = sort ;
902
908
}
903
909
910
+ @ Override
911
+ public ResolvableType getReturnType () {
912
+ return ResolvableType .forClassWithGenerics (Mono .class , this .scrollableResultType );
913
+ }
914
+
904
915
@ Override
905
916
@ SuppressWarnings ({"unchecked" , "OptionalGetWithoutIsPresent" })
906
917
public Mono <Iterable <R >> get (DataFetchingEnvironment env ) throws BindException {
@@ -926,11 +937,6 @@ public Mono<Iterable<R>> get(DataFetchingEnvironment env) throws BindException {
926
937
});
927
938
}
928
939
929
- @ Override
930
- public ResolvableType getReturnType () {
931
- return ResolvableType .forClassWithGenerics (Mono .class , this .scrollableResultType );
932
- }
933
-
934
940
}
935
941
936
942
}
0 commit comments