Skip to content

Commit 02a9c63

Browse files
committed
Polishing.
Comments and formatting.
1 parent 878f2e2 commit 02a9c63

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

src/main/java/org/springframework/data/jpa/repository/support/FluentQuerySupport.java

+1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ abstract class FluentQuerySupport<R> {
4040

4141
protected final Class<R> resultType;
4242
protected final Sort sort;
43+
/** Properties on which the query projects. {@literal null} stands for no special projection. */
4344
protected final @Nullable Set<String> properties;
4445
protected final MappingContext<? extends PersistentEntity<?, ?>, ? extends PersistentProperty<?>> context;
4546

src/main/java/org/springframework/data/jpa/repository/support/QuerydslJpaPredicateExecutor.java

+10-4
Original file line numberDiff line numberDiff line change
@@ -199,10 +199,16 @@ public <S extends T, R> R findBy(Predicate predicate, Function<FetchableFluentQu
199199
return select;
200200
};
201201

202-
FetchableFluentQueryByPredicate<T, T> fluentQuery = new FetchableFluentQueryByPredicate<>(predicate,
203-
entityInformation.getJavaType(), finder, pagedFinder, this::count, this::exists,
204-
this.entityInformation.getJavaType(),
205-
new JpaMetamodelMappingContext(Collections.singleton(this.entityManager.getMetamodel())));
202+
FetchableFluentQueryByPredicate<T, T> fluentQuery = new FetchableFluentQueryByPredicate<>( //
203+
predicate, //
204+
entityInformation.getJavaType(), //
205+
finder, //
206+
pagedFinder, //
207+
this::count, //
208+
this::exists, //
209+
this.entityInformation.getJavaType(), //
210+
new JpaMetamodelMappingContext(Collections.singleton(this.entityManager.getMetamodel())) //
211+
);
206212

207213
return queryFunction.apply((FetchableFluentQuery<S>) fluentQuery);
208214
}

0 commit comments

Comments
 (0)