From 9b51cf44d0a20fe34d90181bd88f18da69ba6cd7 Mon Sep 17 00:00:00 2001 From: Rob Winch Date: Mon, 13 Jul 2015 10:23:19 -0500 Subject: [PATCH] LDAP-333: Support Spring Data Gosling --- .../ldap/repository/support/LdapRepositoryFactory.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/org/springframework/ldap/repository/support/LdapRepositoryFactory.java b/core/src/main/java/org/springframework/ldap/repository/support/LdapRepositoryFactory.java index 41338213..74011b8f 100644 --- a/core/src/main/java/org/springframework/ldap/repository/support/LdapRepositoryFactory.java +++ b/core/src/main/java/org/springframework/ldap/repository/support/LdapRepositoryFactory.java @@ -19,6 +19,7 @@ package org.springframework.ldap.repository.support; import org.springframework.data.querydsl.QueryDslPredicateExecutor; import org.springframework.data.repository.core.EntityInformation; import org.springframework.data.repository.core.NamedQueries; +import org.springframework.data.repository.core.RepositoryInformation; import org.springframework.data.repository.core.RepositoryMetadata; import org.springframework.data.repository.core.support.RepositoryFactorySupport; import org.springframework.data.repository.query.QueryLookupStrategy; @@ -50,7 +51,6 @@ public class LdapRepositoryFactory extends RepositoryFactorySupport { return null; } - @Override @SuppressWarnings({"unchecked", "rawtypes"}) protected Object getTargetRepository(RepositoryMetadata metadata) { if(!isQueryDslRepository(metadata.getRepositoryInterface())) { @@ -67,6 +67,10 @@ public class LdapRepositoryFactory extends RepositoryFactorySupport { } + protected Object getTargetRepository(RepositoryInformation metadata) { + return getTargetRepository((RepositoryMetadata) metadata); + } + private static boolean isQueryDslRepository(Class repositoryInterface) { return QUERY_DSL_PRESENT && QueryDslPredicateExecutor.class.isAssignableFrom(repositoryInterface); }