net.sf.jasperreports.engine.query
Class JRAbstractQueryExecuter

java.lang.Object
  extended by net.sf.jasperreports.engine.query.JRAbstractQueryExecuter
All Implemented Interfaces:
JRQueryExecuter
Direct Known Subclasses:
JRHibernateQueryExecuter, JRJdbcQueryExecuter, JRJpaQueryExecuter, JRMondrianQueryExecuter, JRXmlaQueryExecuter, JRXPathQueryExecuter

public abstract class JRAbstractQueryExecuter
extends java.lang.Object
implements JRQueryExecuter

Base abstract query executer.

Version:
$Id: JRAbstractQueryExecuter.java 1401 2006-09-21 11:04:34 +0300 (Thu, 21 Sep 2006) lucianc $
Author:
Lucian Chirita (lucianc@users.sourceforge.net)

Field Summary
protected  JRDataset dataset
           
 
Constructor Summary
protected JRAbstractQueryExecuter(JRDataset dataset, java.util.Map parametersMap)
           
 
Method Summary
protected  java.util.List getCollectedParameterNames()
          Returns the list of parameter names in the order in which they appear in the query.
protected  JRFillParameter getParameter(java.lang.String parameterName)
          Deprecated. getValueParameter(String) should be used instead
protected abstract  java.lang.String getParameterReplacement(java.lang.String parameterName)
          Returns the replacement text for a query paramter.
protected  java.lang.Object getParameterValue(java.lang.String parameterName)
          Returns the value of a fill paramter.
protected  java.lang.String getQueryString()
          Returns the parsed query string with the paramter clauses replaced by the paramter values and the parameters replaced by getParameterReplacement.
protected  JRValueParameter getValueParameter(java.lang.String parameterName)
          Return a value parameter from the paramters map.
protected  void parseQuery()
          Parses the query and replaces the parameter clauses by the paramter values and the parameters by the return value of getParameterReplacement.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.jasperreports.engine.query.JRQueryExecuter
cancelQuery, close, createDatasource
 

Field Detail

dataset

protected final JRDataset dataset
Constructor Detail

JRAbstractQueryExecuter

protected JRAbstractQueryExecuter(JRDataset dataset,
                                  java.util.Map parametersMap)
Method Detail

parseQuery

protected void parseQuery()
Parses the query and replaces the parameter clauses by the paramter values and the parameters by the return value of getParameterReplacement.


getQueryString

protected java.lang.String getQueryString()
Returns the parsed query string with the paramter clauses replaced by the paramter values and the parameters replaced by getParameterReplacement.

Returns:
the parsed query string

getCollectedParameterNames

protected java.util.List getCollectedParameterNames()
Returns the list of parameter names in the order in which they appear in the query.

Returns:
the list of parameter names

getParameterValue

protected java.lang.Object getParameterValue(java.lang.String parameterName)
Returns the value of a fill paramter.

Parameters:
parameterName - the paramter name
Returns:
the parameter value

getParameter

protected JRFillParameter getParameter(java.lang.String parameterName)
Deprecated. getValueParameter(String) should be used instead

Return a fill parameter from the paramter map.

Parameters:
parameterName - the paramter name
Returns:
the parameter

getValueParameter

protected JRValueParameter getValueParameter(java.lang.String parameterName)
Return a value parameter from the paramters map.

Parameters:
parameterName - the paramter name
Returns:
the parameter

getParameterReplacement

protected abstract java.lang.String getParameterReplacement(java.lang.String parameterName)
Returns the replacement text for a query paramter.

Parameters:
parameterName - the paramter name
Returns:
the replacement text
See Also:
JRQueryChunk.TYPE_PARAMETER


© 2001-2006 JasperSoft Corporation www.jaspersoft.com