ca.uhn.cache.internal.hibernate
Interface IQueryParamHelper

All Known Implementing Classes:
DateParamHelper, StringParamHelper

public interface IQueryParamHelper

Factory like class that acts as a helper to be used by the HibernateQueryResultStore to create Field subclasses and generate the hibernate HQL corresponding to IQueryParams.

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

Method Summary
 Field createField(Record theRecord, IPointQueryParam theQueryParam)
          Creates an instance of the Field subclass corresponding to the provided IQueryParam.
 java.lang.String generateHql(IGroupQueryParam theGroupQueryParam, int theIndex)
          Generates the HQL corresponding to the provided "point" query param.
 java.lang.String generateHql(IPointQueryParam thePointQueryParam, int theIndex)
          Generates the HQL corresponding to the provided "point" query param.
 java.util.Map generateHqlParamMap(IGroupQueryParam theGroupQueryParam, int theIndex)
          Generates a Map of paramName => paramValue corresponding to the provided "point" query param.
 java.util.Map generateHqlParamMap(IPointQueryParam thePointQueryParam, int theIndex)
          Generates a Map of paramName => paramValue corresponding to the provided "point" query param.
 java.lang.Class getFieldClass()
           
 

Method Detail

createField

public Field createField(Record theRecord,
                         IPointQueryParam theQueryParam)
Creates an instance of the Field subclass corresponding to the provided IQueryParam.

Parameters:
theRecord - The record this field belongs to.
theQueryParam - The provided query param.
Returns:
The created Field subclass.

getFieldClass

public java.lang.Class getFieldClass()
Returns:
The class of the field that is created when invoking the method createField(Record, IPointQueryParam)

generateHql

public java.lang.String generateHql(IPointQueryParam thePointQueryParam,
                                    int theIndex)
Generates the HQL corresponding to the provided "point" query param.

Parameters:
thePointQueryParam - The provided "point" query param.
theIndex - The index of the query param within the containing query.
Returns:
The generated HQL.

generateHql

public java.lang.String generateHql(IGroupQueryParam theGroupQueryParam,
                                    int theIndex)
Generates the HQL corresponding to the provided "point" query param.

Parameters:
theGroupQueryParam - The provided "group" query param.
theIndex - The index of the query param within the containing query.
Returns:
The generated HQL.

generateHqlParamMap

public java.util.Map generateHqlParamMap(IPointQueryParam thePointQueryParam,
                                         int theIndex)
Generates a Map of paramName => paramValue corresponding to the provided "point" query param.

Parameters:
thePointQueryParam - The provided "point" query param.
theIndex - The index of the query param within the containing query.
Returns:
The generated Map.

generateHqlParamMap

public java.util.Map generateHqlParamMap(IGroupQueryParam theGroupQueryParam,
                                         int theIndex)
Generates a Map of paramName => paramValue corresponding to the provided "point" query param.

Parameters:
theGroupQueryParam - The provided "group" query param.
theIndex - The index of the query param within the containing query.
Returns:
The generated Map.


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