diff --git a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/PreparedQueryCacheImpl.java b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/PreparedQueryCacheImpl.java index e37f4efc7..5026c4ef8 100644 --- a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/PreparedQueryCacheImpl.java +++ b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/PreparedQueryCacheImpl.java @@ -52,11 +52,8 @@ import org.apache.openjpa.lib.util.Localizer; public class PreparedQueryCacheImpl implements PreparedQueryCache { private static final String PATTERN_SEPARATOR = "\\;"; private static final String EXLUDED_BY_USER = "Excluded by user"; - private static final String JPQL = "javax.persistence.JPQL"; - private static final String SELECT = "SELECT "; // Key: Query identifier private final Map _delegate; - private final Map _finders; // Key: Query identifier Value: Reason why excluded private final Map _uncachables; private List _exclusionPatterns; @@ -67,7 +64,6 @@ public class PreparedQueryCacheImpl implements PreparedQueryCache { public PreparedQueryCacheImpl() { _delegate = new HashMap(); - _finders = new HashMap(); _uncachables = new HashMap(); _stats = new QueryStatistics.Default(); } @@ -164,15 +160,6 @@ public class PreparedQueryCacheImpl implements PreparedQueryCache { } } - public PreparedQuery get(Class c) { - lock(); - try { - return _finders.get(c); - } finally { - unlock(); - } - } - public Boolean isCachable(String id) { lock(); try { diff --git a/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/PreparedQueryCache.java b/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/PreparedQueryCache.java index fe086c4fc..c9ad36d0a 100644 --- a/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/PreparedQueryCache.java +++ b/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/PreparedQueryCache.java @@ -128,13 +128,6 @@ public interface PreparedQueryCache extends Configurable { */ public PreparedQuery get(String id); - /** - * Get the PreparedQuery for the finder query of the given class. - * - * @param c class for which a find-by-primary-key query is looked up - */ - public PreparedQuery get(Class c); - /** * Affirms if a PreparedQuery can be cached against the given key. *