Polishing.

Comments and formatting.
This commit is contained in:
Jens Schauder
2021-10-25 08:34:41 +02:00
committed by Greg L. Turnquist
parent ee9ef8665e
commit 43305f67cb
2 changed files with 11 additions and 4 deletions

View File

@@ -40,6 +40,7 @@ abstract class FluentQuerySupport<R> {
protected final Class<R> resultType;
protected final Sort sort;
/** Properties on which the query projects. {@literal null} stands for no special projection. */
protected final @Nullable Set<String> properties;
protected final MappingContext<? extends PersistentEntity<?, ?>, ? extends PersistentProperty<?>> context;

View File

@@ -199,10 +199,16 @@ public class QuerydslJpaPredicateExecutor<T> implements QuerydslPredicateExecuto
return select;
};
FetchableFluentQueryByPredicate<T, T> fluentQuery = new FetchableFluentQueryByPredicate<>(predicate,
entityInformation.getJavaType(), finder, pagedFinder, this::count, this::exists,
this.entityInformation.getJavaType(),
new JpaMetamodelMappingContext(Collections.singleton(this.entityManager.getMetamodel())));
FetchableFluentQueryByPredicate<T, T> fluentQuery = new FetchableFluentQueryByPredicate<>( //
predicate, //
entityInformation.getJavaType(), //
finder, //
pagedFinder, //
this::count, //
this::exists, //
this.entityInformation.getJavaType(), //
new JpaMetamodelMappingContext(Collections.singleton(this.entityManager.getMetamodel())) //
);
return queryFunction.apply((FetchableFluentQuery<S>) fluentQuery);
}