ca.uhn.cache.internal
Interface IQueryResultStore

All Known Implementing Classes:
HibernateQueryResultStore

public interface IQueryResultStore

Responsible for storing IQueryResults.

This is not a cache. The underlying implementation might cache internally, but objects that are stored MUST be retrieved reliably when requested.

Version:
$Revision: 1.1 $ updated on $Date: 2005/01/24 22:53:27 $ by $Author: bryan_tripp $
Author:
Alexei Guevara, Bryan Tripp, Laura Bright TODO split insert responsability into two separate method insert and update. TODO Make insert throw an exception if the item is already in the store.

Method Summary
 int delete(IQuery theQuery)
          Removes the data matching the specified query from the store.
 void insert(IQueryResult theQueryResult)
          Stores the given query result.
 IQueryResult select(IQuery theQuery)
          Returns the query result from the store that matches the given query.
 

Method Detail

insert

public void insert(IQueryResult theQueryResult)
            throws QueryResultStoreException
Stores the given query result.

Parameters:
theQueryResult - The IQueryResult.
Throws:
QueryResultStoreException - If the insert operation could not be successfully completed.

select

public IQueryResult select(IQuery theQuery)
                    throws QueryResultStoreException
Returns the query result from the store that matches the given query.

Parameters:
theQuery - The query.
Returns:
The IQueryResult matching the query.
Throws:
QueryResultStoreException - If the select operation could not be successfully completed.

delete

public int delete(IQuery theQuery)
           throws QueryResultStoreException
Removes the data matching the specified query from the store.

Parameters:
theQuery - The query.
Returns:
The number of data items deleted from the query result store.
Throws:
QueryResultStoreException - If the delete operation could not be successfully completed.


Copyright © 2004-2005 University Health Network. All Rights Reserved.