2.17.2: 2011-06-17

net.sf.basedb.core.hibernate
Class AbstractQueryCache

java.lang.Object
  extended by 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) $

Field Summary
private  Map<String,org.hibernate.Query> cache
           
 
Constructor Summary
protected AbstractQueryCache()
           
 
Method Summary
protected  void cacheQuery(String key, org.hibernate.Query query)
          Cache a query.
protected  org.hibernate.Query getCachedQuery(String key)
          Get a cached query.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cache

private final Map<String,org.hibernate.Query> cache
Constructor Detail

AbstractQueryCache

protected AbstractQueryCache()
Method Detail

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

2.17.2: 2011-06-17