mirror of https://github.com/apache/openjpa.git
OPENJPA-703: Clean up unused varaibles in PreparedQueryCache implementaion and remove support for Class based keys kep as placeholder for finder queries.
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@744966 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3adf70a029
commit
2582d4de0b
|
@ -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<String, PreparedQuery> _delegate;
|
||||
private final Map<Class, PreparedQuery> _finders;
|
||||
// Key: Query identifier Value: Reason why excluded
|
||||
private final Map<String, String> _uncachables;
|
||||
private List<String> _exclusionPatterns;
|
||||
|
@ -67,7 +64,6 @@ public class PreparedQueryCacheImpl implements PreparedQueryCache {
|
|||
|
||||
public PreparedQueryCacheImpl() {
|
||||
_delegate = new HashMap<String, PreparedQuery>();
|
||||
_finders = new HashMap<Class, PreparedQuery>();
|
||||
_uncachables = new HashMap<String, String>();
|
||||
_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 {
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue