Package net.sf.basedb.core.hibernate
Class AbstractQueryCache
java.lang.Object
net.sf.basedb.core.hibernate.AbstractQueryCache
- Direct Known Subclasses:
SessionWrapper
,StatelessSessionWrapper
Abstract base class used to cache queries for a session.
- Since:
- 2.16
- Author:
- Nicklas
- Last modified
- $Date: 2017-05-22 14:35:27 +0200 (må, 22 maj 2017) $
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
cacheQuery
(String key, Query<?> query) Cache a query.protected Query<?>
getCachedQuery
(String key) Get a cached query.protected <T> Query<T>
getCachedQuery
(String key, Class<T> resultType)
-
Field Details
-
cache
-
-
Constructor Details
-
AbstractQueryCache
protected AbstractQueryCache()
-
-
Method Details
-
getCachedQuery
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
-
getCachedQuery
- Since:
- 3.11
-
cacheQuery
Cache a query.- Parameters:
key
- The key (usually the HQL/SQL query string or a named query)query
- The query to cache
-