Package net.sf.jasperreports.engine.fill
Class JRFillDatasetRun
- java.lang.Object
-
- net.sf.jasperreports.engine.fill.JRFillDatasetRun
-
- All Implemented Interfaces:
Cloneable,JRCloneable,JRDatasetRun,JRIdentifiable,JRPropertiesHolder
- Direct Known Subclasses:
FillDatasetRun
public class JRFillDatasetRun extends Object implements JRDatasetRun
Class used to instantiate sub datasets.- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
-
-
Field Summary
Fields Modifier and Type Field Description protected JRExpressionconnectionExpressionprotected JRFillDatasetdatasetprotected JRExpressiondataSourceExpressionprotected JRFillExpressionEvaluatorexpressionEvaluatorprotected BaseReportFillerfillerprotected JRDatasetParameter[]parametersprotected JRExpressionparametersMapExpressionprotected JRDatasetRunparentDatasetRun
-
Constructor Summary
Constructors Modifier Constructor Description protectedJRFillDatasetRun(BaseReportFiller filler, JRFillExpressionEvaluator expressionEvaluator, JRDatasetRun datasetRun, JRFillDataset dataset)protectedJRFillDatasetRun(BaseReportFiller filler, JRDatasetRun datasetRun, JRFillDataset dataset)protectedJRFillDatasetRun(JRBaseFiller filler, JRFillExpressionEvaluator expressionEvaluator, JRDatasetRun datasetRun, JRFillObjectFactory factory)JRFillDatasetRun(JRBaseFiller filler, JRDatasetRun datasetRun, JRFillObjectFactory factory)Construct an instance for a dataset run.JRFillDatasetRun(JRFillDatasetRun datasetRun, JRFillCloneFactory factory)protectedJRFillDatasetRun(JRDatasetRun datasetRun, JRFillObjectFactory factory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanadvanceDataset()protected voidcheckInterrupted()Objectclone()protected voidcopyConnectionParameter(Map<String,Object> parameterValues)voidcopyReturnValues()protected voiddetail()voidevaluate(JRFillElementDataset elementDataset, byte evaluation)Instantiates and iterates the sub dataset for a chart dataset evaluation.JRExpressiongetConnectionExpression()Returns the DB connection expression.protected JRFillDatasetgetDataset()StringgetDatasetName()Returns the sub dataset name.JRExpressiongetDataSourceExpression()Returns the data source expression.JRDatasetParameter[]getParameters()Returns the list of parameter values.JRExpressiongetParametersMapExpression()Returns the parameters map expression.JRPropertiesHoldergetParentProperties()Returns the parent properties holder, whose properties are used as defaults for this object.JRPropertiesMapgetPropertiesMap()Returns this object's properties map.List<ReturnValue>getReturnValues()Returns the list of values to be copied from the subdataset.UUIDgetUUID()protected voidgroup()booleanhasProperties()Checks whether the object has any properties.protected voidinitReturnValues(JRFillObjectFactory factory)protected voiditerate()protected voidsaveReturnVariables()voidsetBand(JRFillBand band)protected voidstartData()protected booleantoStartWhenNoData()
-
-
-
Field Detail
-
filler
protected final BaseReportFiller filler
-
expressionEvaluator
protected final JRFillExpressionEvaluator expressionEvaluator
-
parentDatasetRun
protected final JRDatasetRun parentDatasetRun
-
dataset
protected final JRFillDataset dataset
-
parametersMapExpression
protected JRExpression parametersMapExpression
-
parameters
protected JRDatasetParameter[] parameters
-
connectionExpression
protected JRExpression connectionExpression
-
dataSourceExpression
protected JRExpression dataSourceExpression
-
-
Constructor Detail
-
JRFillDatasetRun
public JRFillDatasetRun(JRBaseFiller filler, JRDatasetRun datasetRun, JRFillObjectFactory factory)
Construct an instance for a dataset run.- Parameters:
filler- the fillerdatasetRun- the dataset runfactory- the fill object factory
-
JRFillDatasetRun
protected JRFillDatasetRun(JRDatasetRun datasetRun, JRFillObjectFactory factory)
-
JRFillDatasetRun
protected JRFillDatasetRun(JRBaseFiller filler, JRFillExpressionEvaluator expressionEvaluator, JRDatasetRun datasetRun, JRFillObjectFactory factory)
-
JRFillDatasetRun
protected JRFillDatasetRun(BaseReportFiller filler, JRDatasetRun datasetRun, JRFillDataset dataset)
-
JRFillDatasetRun
protected JRFillDatasetRun(BaseReportFiller filler, JRFillExpressionEvaluator expressionEvaluator, JRDatasetRun datasetRun, JRFillDataset dataset)
-
JRFillDatasetRun
public JRFillDatasetRun(JRFillDatasetRun datasetRun, JRFillCloneFactory factory)
-
-
Method Detail
-
initReturnValues
protected void initReturnValues(JRFillObjectFactory factory)
-
setBand
public void setBand(JRFillBand band)
-
evaluate
public void evaluate(JRFillElementDataset elementDataset, byte evaluation) throws JRException
Instantiates and iterates the sub dataset for a chart dataset evaluation.- Parameters:
elementDataset- the chart datasetevaluation- the evaluation type- Throws:
JRException
-
saveReturnVariables
protected void saveReturnVariables()
-
copyReturnValues
public void copyReturnValues()
-
copyConnectionParameter
protected void copyConnectionParameter(Map<String,Object> parameterValues)
-
iterate
protected void iterate() throws JRException- Throws:
JRException
-
toStartWhenNoData
protected boolean toStartWhenNoData()
-
advanceDataset
protected boolean advanceDataset() throws JRException- Throws:
JRException
-
checkInterrupted
protected void checkInterrupted()
-
group
protected void group() throws JRException, JRScriptletException- Throws:
JRExceptionJRScriptletException
-
startData
protected void startData() throws JRScriptletException, JRException- Throws:
JRScriptletExceptionJRException
-
detail
protected void detail() throws JRScriptletException, JRException- Throws:
JRScriptletExceptionJRException
-
getDatasetName
public String getDatasetName()
Description copied from interface:JRDatasetRunReturns the sub dataset name.- Specified by:
getDatasetNamein interfaceJRDatasetRun- Returns:
- the sub dataset name
-
getParametersMapExpression
public JRExpression getParametersMapExpression()
Description copied from interface:JRDatasetRunReturns the parameters map expression.The result of this expression is used as the parameters map when instantiating the dataset.
- Specified by:
getParametersMapExpressionin interfaceJRDatasetRun- Returns:
- the parameters map expression
-
getParameters
public JRDatasetParameter[] getParameters()
Description copied from interface:JRDatasetRunReturns the list of parameter values.- Specified by:
getParametersin interfaceJRDatasetRun- Returns:
- the list of parameter values
-
getConnectionExpression
public JRExpression getConnectionExpression()
Description copied from interface:JRDatasetRunReturns the DB connection expression.The result of this expression is used as the DB connection when instantiating the dataset.
- Specified by:
getConnectionExpressionin interfaceJRDatasetRun- Returns:
- the DB connection expression
-
getDataSourceExpression
public JRExpression getDataSourceExpression()
Description copied from interface:JRDatasetRunReturns the data source expression.The result of this expression is used as the data source when instantiating the dataset.
- Specified by:
getDataSourceExpressionin interfaceJRDatasetRun- Returns:
- the data source expression
-
getDataset
protected JRFillDataset getDataset()
-
getUUID
public UUID getUUID()
- Specified by:
getUUIDin interfaceJRIdentifiable
-
clone
public Object clone()
- Specified by:
clonein interfaceJRCloneable- Overrides:
clonein classObject
-
hasProperties
public boolean hasProperties()
Description copied from interface:JRPropertiesHolderChecks whether the object has any properties.- Specified by:
hasPropertiesin interfaceJRPropertiesHolder- Returns:
- whether the object has any properties
-
getPropertiesMap
public JRPropertiesMap getPropertiesMap()
Description copied from interface:JRPropertiesHolderReturns this object's properties map.- Specified by:
getPropertiesMapin interfaceJRPropertiesHolder- Returns:
- this object's properties map
-
getParentProperties
public JRPropertiesHolder getParentProperties()
Description copied from interface:JRPropertiesHolderReturns the parent properties holder, whose properties are used as defaults for this object.- Specified by:
getParentPropertiesin interfaceJRPropertiesHolder- Returns:
- the parent properties holder, or
nullif no parent
-
getReturnValues
public List<ReturnValue> getReturnValues()
Description copied from interface:JRDatasetRunReturns the list of values to be copied from the subdataset.- Specified by:
getReturnValuesin interfaceJRDatasetRun- Returns:
- the list of copied values.
-
-