net.sf.basedb.core.hibernate
Class AbstractQueryCache
java.lang.Object
net.sf.basedb.core.hibernate.AbstractQueryCache
- Direct Known Subclasses:
- SessionWrapper, StatelessSessionWrapper
public abstract class AbstractQueryCache
- extends Object
Abstract base class used to cache queries for a session.
- Since:
- 2.16
- Author:
- Nicklas
- Last modified
- $Date: 2010-06-10 10:54:19 +0200 (Thu, 10 Jun 2010) $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
cache
private final Map<String,org.hibernate.Query> cache
AbstractQueryCache
protected AbstractQueryCache()
getCachedQuery
protected org.hibernate.Query getCachedQuery(String key)
- Get a cached query.
- Parameters:
key
- The key (usually the HQL/SQL query string or a named query)
- Returns:
- A cached query or null if the query is not cached
cacheQuery
protected void cacheQuery(String key,
org.hibernate.Query query)
- Cache a query.
- Parameters:
key
- The key (usually the HQL/SQL query string or a named query)query
- The query to cache