diff --git a/spring-data-commons-core/src/main/java/org/springframework/data/repository/query/QueryLookupStrategy.java b/spring-data-commons-core/src/main/java/org/springframework/data/repository/query/QueryLookupStrategy.java index a8f93c189..3d9444cec 100644 --- a/spring-data-commons-core/src/main/java/org/springframework/data/repository/query/QueryLookupStrategy.java +++ b/spring-data-commons-core/src/main/java/org/springframework/data/repository/query/QueryLookupStrategy.java @@ -1,5 +1,6 @@ package org.springframework.data.repository.query; +import java.lang.reflect.Method; import java.util.Locale; import org.springframework.util.StringUtils; @@ -10,7 +11,7 @@ import org.springframework.util.StringUtils; * * @author Oliver Gierke */ -public interface QueryLookupStrategy { +public interface QueryLookupStrategy { public static enum Key { @@ -40,5 +41,5 @@ public interface QueryLookupStrategy { * @param method * @return */ - RepositoryQuery resolveQuery(Q method); + RepositoryQuery resolveQuery(Method method); } \ No newline at end of file diff --git a/spring-data-commons-core/src/main/java/org/springframework/data/repository/support/RepositoryFactoryBeanSupport.java b/spring-data-commons-core/src/main/java/org/springframework/data/repository/support/RepositoryFactoryBeanSupport.java index 68e41a70c..740b58a4c 100644 --- a/spring-data-commons-core/src/main/java/org/springframework/data/repository/support/RepositoryFactoryBeanSupport.java +++ b/spring-data-commons-core/src/main/java/org/springframework/data/repository/support/RepositoryFactoryBeanSupport.java @@ -38,7 +38,7 @@ import org.springframework.util.Assert; public abstract class RepositoryFactoryBeanSupport> implements FactoryBean, InitializingBean, BeanFactoryAware { - private RepositoryFactorySupport factory; + private RepositoryFactorySupport factory; private Key queryLookupStrategyKey; private Class repositoryInterface; @@ -150,7 +150,7 @@ public abstract class RepositoryFactoryBeanSupport> * * @return */ - protected abstract RepositoryFactorySupport createRepositoryFactory(); + protected abstract RepositoryFactorySupport createRepositoryFactory(); /* diff --git a/spring-data-commons-core/src/main/java/org/springframework/data/repository/support/RepositoryFactorySupport.java b/spring-data-commons-core/src/main/java/org/springframework/data/repository/support/RepositoryFactorySupport.java index 8cd18ac4f..92566ccb4 100644 --- a/spring-data-commons-core/src/main/java/org/springframework/data/repository/support/RepositoryFactorySupport.java +++ b/spring-data-commons-core/src/main/java/org/springframework/data/repository/support/RepositoryFactorySupport.java @@ -49,7 +49,7 @@ import org.springframework.util.Assert; * * @author Oliver Gierke */ -public abstract class RepositoryFactorySupport { +public abstract class RepositoryFactorySupport { private QueryLookupStrategy.Key queryLookupStrategyKey; @@ -147,15 +147,6 @@ public abstract class RepositoryFactorySupport { Class domainClass); - /** - * Create a {@link QueryMethod} instance for the given {@link Method}. - * - * @param method - * @return - */ - protected abstract Q getQueryMethod(Method method); - - /** * Determines the base class for the repository to be created. * @@ -171,7 +162,7 @@ public abstract class RepositoryFactorySupport { * @param key can be {@literal null} * @return */ - protected abstract QueryLookupStrategy getQueryLookupStrategy(Key key); + protected abstract QueryLookupStrategy getQueryLookupStrategy(Key key); /** @@ -360,12 +351,12 @@ public abstract class RepositoryFactorySupport { this.customImplementation = customImplementation; this.target = target; - QueryLookupStrategy strategy = + QueryLookupStrategy lookupStrategy = getQueryLookupStrategy(queryLookupStrategyKey); for (Method method : getFinderMethods(repositoryInterface)) { - Q queryMethod = getQueryMethod(method); - queries.put(method, strategy.resolveQuery(queryMethod)); + + queries.put(method, lookupStrategy.resolveQuery(method)); } }