Rename DefaultQuerydslBinderCustomizer to QuerydslBinderCustomizerDefaults.

See #206.
Original Pull Request: #2292
This commit is contained in:
Christoph Strobl
2021-02-09 12:30:24 +01:00
parent 4e07b85934
commit ee004b0f10
4 changed files with 8 additions and 8 deletions

View File

@@ -1667,7 +1667,7 @@ interface UserRepository extends CrudRepository<User, String>,
<5> Exclude the `password` property from `Predicate` resolution.
====
Additionally, you can register a `DefaultQuerydslBinderCustomizer` bean to apply default Querydsl bindings before applying specific bindings from the repository or `@QuerydslPredicate`.
TIP: You can register a `QuerydslBinderCustomizerDefaults` bean holding default Querydsl bindings before applying specific bindings from the repository or `@QuerydslPredicate`.
[[core.repository-populators]]
=== Repository Populators

View File

@@ -24,4 +24,4 @@ import com.querydsl.core.types.EntityPath;
* @author Mark Paluch
* @since 2.5
*/
public interface DefaultQuerydslBinderCustomizer extends QuerydslBinderCustomizer<EntityPath<?>> {}
public interface QuerydslBinderCustomizerDefaults extends QuerydslBinderCustomizer<EntityPath<?>> {}

View File

@@ -159,7 +159,7 @@ public class QuerydslBindingsFactory implements ApplicationContextAware {
}
/**
* Obtains registered {@link DefaultQuerydslBinderCustomizer} instances from the
* Obtains registered {@link QuerydslBinderCustomizerDefaults} instances from the
* {@link org.springframework.beans.factory.BeanFactory}.
*
* @return
@@ -171,12 +171,12 @@ public class QuerydslBindingsFactory implements ApplicationContextAware {
private QuerydslBinderCustomizer<EntityPath<?>> getDefaultQuerydslBinderCustomizer(
AutowireCapableBeanFactory beanFactory) {
List<DefaultQuerydslBinderCustomizer> customizers = beanFactory
.getBeanProvider(DefaultQuerydslBinderCustomizer.class).stream().collect(Collectors.toList());
List<QuerydslBinderCustomizerDefaults> customizers = beanFactory
.getBeanProvider(QuerydslBinderCustomizerDefaults.class).stream().collect(Collectors.toList());
return (bindings, root) -> {
for (DefaultQuerydslBinderCustomizer defaultQuerydslBinderCustomizer : customizers) {
defaultQuerydslBinderCustomizer.customize(bindings, root);
for (QuerydslBinderCustomizerDefaults querydslBinderCustomizerDefaults : customizers) {
querydslBinderCustomizerDefaults.customize(bindings, root);
}
};
}

View File

@@ -148,7 +148,7 @@ class QuerydslBindingsFactoryUnitTests {
}
}
static class DefaultCustomizer implements DefaultQuerydslBinderCustomizer {
static class DefaultCustomizer implements QuerydslBinderCustomizerDefaults {
@Override
public void customize(QuerydslBindings bindings, EntityPath<?> root) {