KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > cache > QueryCache


1 //$Id: QueryCache.java,v 1.4 2005/05/25 01:22:05 oneovthafew Exp $
2
package org.hibernate.cache;
3
4 import java.util.List JavaDoc;
5 import java.util.Set JavaDoc;
6
7 import org.hibernate.HibernateException;
8 import org.hibernate.engine.SessionImplementor;
9 import org.hibernate.type.Type;
10
11 /**
12  * Defines the contract for caches capable of storing query results. These
13  * caches should only concern themselves with storing the matching result ids.
14  * The transactional semantics are necessarily less strict than the semantics
15  * of an item cache.
16  *
17  * @author Gavin King
18  */

19 public interface QueryCache {
20
21     public void clear() throws CacheException;
22     
23     public void put(QueryKey key, Type[] returnTypes, List JavaDoc result, SessionImplementor session) throws HibernateException;
24
25     public List JavaDoc get(QueryKey key, Type[] returnTypes, boolean isNaturalKeyLookup, Set JavaDoc spaces, SessionImplementor session)
26     throws HibernateException;
27
28     public void destroy();
29
30     public Cache getCache();
31
32     public String JavaDoc getRegionName();
33 }
34
Popular Tags