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 JRExpression
connectionExpression
protected JRFillDataset
dataset
protected JRExpression
dataSourceExpression
protected JRFillExpressionEvaluator
expressionEvaluator
protected BaseReportFiller
filler
protected JRDatasetParameter[]
parameters
protected JRExpression
parametersMapExpression
protected JRDatasetRun
parentDatasetRun
-
Constructor Summary
Constructors Modifier Constructor Description protected
JRFillDatasetRun(BaseReportFiller filler, JRFillExpressionEvaluator expressionEvaluator, JRDatasetRun datasetRun, JRFillDataset dataset)
protected
JRFillDatasetRun(BaseReportFiller filler, JRDatasetRun datasetRun, JRFillDataset dataset)
protected
JRFillDatasetRun(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)
protected
JRFillDatasetRun(JRDatasetRun datasetRun, JRFillObjectFactory factory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
advanceDataset()
protected void
checkInterrupted()
Object
clone()
protected void
copyConnectionParameter(Map<String,Object> parameterValues)
void
copyReturnValues()
protected void
detail()
void
evaluate(JRFillElementDataset elementDataset, byte evaluation)
Instantiates and iterates the sub dataset for a chart dataset evaluation.JRExpression
getConnectionExpression()
Returns the DB connection expression.protected JRFillDataset
getDataset()
String
getDatasetName()
Returns the sub dataset name.JRExpression
getDataSourceExpression()
Returns the data source expression.JRDatasetParameter[]
getParameters()
Returns the list of parameter values.JRExpression
getParametersMapExpression()
Returns the parameters map expression.JRPropertiesHolder
getParentProperties()
Returns the parent properties holder, whose properties are used as defaults for this object.JRPropertiesMap
getPropertiesMap()
Returns this object's properties map.List<ReturnValue>
getReturnValues()
Returns the list of values to be copied from the subdataset.UUID
getUUID()
protected void
group()
boolean
hasProperties()
Checks whether the object has any properties.protected void
initReturnValues(JRFillObjectFactory factory)
protected void
iterate()
protected void
saveReturnVariables()
void
setBand(JRFillBand band)
protected void
startData()
protected boolean
toStartWhenNoData()
-
-
-
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:
JRException
JRScriptletException
-
startData
protected void startData() throws JRScriptletException, JRException
- Throws:
JRScriptletException
JRException
-
detail
protected void detail() throws JRScriptletException, JRException
- Throws:
JRScriptletException
JRException
-
getDatasetName
public String getDatasetName()
Description copied from interface:JRDatasetRun
Returns the sub dataset name.- Specified by:
getDatasetName
in interfaceJRDatasetRun
- Returns:
- the sub dataset name
-
getParametersMapExpression
public JRExpression getParametersMapExpression()
Description copied from interface:JRDatasetRun
Returns the parameters map expression.The result of this expression is used as the parameters map when instantiating the dataset.
- Specified by:
getParametersMapExpression
in interfaceJRDatasetRun
- Returns:
- the parameters map expression
-
getParameters
public JRDatasetParameter[] getParameters()
Description copied from interface:JRDatasetRun
Returns the list of parameter values.- Specified by:
getParameters
in interfaceJRDatasetRun
- Returns:
- the list of parameter values
-
getConnectionExpression
public JRExpression getConnectionExpression()
Description copied from interface:JRDatasetRun
Returns the DB connection expression.The result of this expression is used as the DB connection when instantiating the dataset.
- Specified by:
getConnectionExpression
in interfaceJRDatasetRun
- Returns:
- the DB connection expression
-
getDataSourceExpression
public JRExpression getDataSourceExpression()
Description copied from interface:JRDatasetRun
Returns the data source expression.The result of this expression is used as the data source when instantiating the dataset.
- Specified by:
getDataSourceExpression
in interfaceJRDatasetRun
- Returns:
- the data source expression
-
getDataset
protected JRFillDataset getDataset()
-
getUUID
public UUID getUUID()
- Specified by:
getUUID
in interfaceJRIdentifiable
-
clone
public Object clone()
- Specified by:
clone
in interfaceJRCloneable
- Overrides:
clone
in classObject
-
hasProperties
public boolean hasProperties()
Description copied from interface:JRPropertiesHolder
Checks whether the object has any properties.- Specified by:
hasProperties
in interfaceJRPropertiesHolder
- Returns:
- whether the object has any properties
-
getPropertiesMap
public JRPropertiesMap getPropertiesMap()
Description copied from interface:JRPropertiesHolder
Returns this object's properties map.- Specified by:
getPropertiesMap
in interfaceJRPropertiesHolder
- Returns:
- this object's properties map
-
getParentProperties
public JRPropertiesHolder getParentProperties()
Description copied from interface:JRPropertiesHolder
Returns the parent properties holder, whose properties are used as defaults for this object.- Specified by:
getParentProperties
in interfaceJRPropertiesHolder
- Returns:
- the parent properties holder, or
null
if no parent
-
getReturnValues
public List<ReturnValue> getReturnValues()
Description copied from interface:JRDatasetRun
Returns the list of values to be copied from the subdataset.- Specified by:
getReturnValues
in interfaceJRDatasetRun
- Returns:
- the list of copied values.
-
-