com.ebay.carad.os.vitalsigns.templates
Class QueryProvider

java.lang.Object
  extended by com.ebay.carad.os.vitalsigns.templates.QueryProvider
All Implemented Interfaces:
IMultiTemplatizableProvider

public class QueryProvider
extends java.lang.Object
implements IMultiTemplatizableProvider

Takes a query and a DAO, and generates a list of rows as Object[] arrays, sorted by column name.

Version:
$Id$
Author:
Jeremy Kraybill, Jeremy Thomerson

Field Summary
private static org.apache.log4j.Logger LOGGER
           
private  java.lang.String mQuery
           
private  ISqlDAO mSqlDAO
           
 
Constructor Summary
QueryProvider()
           
 
Method Summary
 java.util.List getParameterList()
          Provides a list of lists.
 void setDao(ISqlDAO dao)
          IoC method to specify which DAO is to be used for running the template query.
 void setQuery(java.lang.String query)
          IoC method to set the template query.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOGGER

private static final org.apache.log4j.Logger LOGGER

mQuery

private java.lang.String mQuery

mSqlDAO

private ISqlDAO mSqlDAO
Constructor Detail

QueryProvider

public QueryProvider()
Method Detail

setQuery

public void setQuery(java.lang.String query)
IoC method to set the template query.

Parameters:
query - query to use to generate child reports

setDao

public void setDao(ISqlDAO dao)
IoC method to specify which DAO is to be used for running the template query. This allows the DAO to be different from the wrapped report's DAO, which may be useful.

Parameters:
dao - the DAO to use for the template query.

getParameterList

public java.util.List getParameterList()
Description copied from interface: IMultiTemplatizableProvider
Provides a list of lists. Each sub-list represents one set of parameter data. Each sub-list must be the same length.

Specified by:
getParameterList in interface IMultiTemplatizableProvider
Returns:
a list of lists of Objects


Copyright © 2004-2009. All Rights Reserved.