ca.uhn.cache
Interface IMethodDataSourceHelper

All Known Implementing Classes:
AbstractMethodDataSourceHelper

public interface IMethodDataSourceHelper

Adapts the arguments and return values of a particular Java method to work with a IDataSource. It is assumed that the Java method corresponds to some query, and the return value corresponds to the results of the query, which are to be cached. Meant to be implemented for each method to be wrapped. Used by MethodDataSource.

Version:
$Revision: 1.1 $ updated on $Date: 2005/01/24 22:52:08 $ by $Author: bryan_tripp $
Author:
Alexei Guevara

Method Summary
 java.lang.Object[] buildArguments(IQuery theQuery)
          Builds the arguments to be used in the underlying method invocation, corresponding to the provided query.
 IQueryResult buildQueryResult(java.lang.Object theObject)
          Builds a query result from the provided object.
 

Method Detail

buildQueryResult

public IQueryResult buildQueryResult(java.lang.Object theObject)
Builds a query result from the provided object. A IQueryResult is composed of zero or more IDataItems.

Parameters:
theObject - The provided object.
Returns:
The query result.

buildArguments

public java.lang.Object[] buildArguments(IQuery theQuery)
Builds the arguments to be used in the underlying method invocation, corresponding to the provided query.

Parameters:
theQuery - The provided query.
Returns:
The arguments built.


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