public abstract class JRFillElementDataset extends Object implements JRElementDataset
JRElementDataset implementation used at report fill time.
A dataset implementation usually involves a set of expressions which are used to feed data to some internal data structures. The collected data is then transformed into report output. An implementation needs to implement abstract methods that initialize, evaluate and increment the dataset.
JRFillObjectFactory.registerElementDataset(JRFillElementDataset)| Modifier and Type | Field and Description |
|---|---|
protected JRFillDatasetRun |
datasetRun |
protected JRGroup |
incrementGroup |
protected JRElementDataset |
parent |
protected JRGroup |
resetGroup |
| Modifier | Constructor and Description |
|---|---|
protected |
JRFillElementDataset(JRElementDataset dataset,
JRFillObjectFactory factory) |
| Modifier and Type | Method and Description |
|---|---|
Object |
clone() |
protected abstract void |
customEvaluate(JRCalculator calculator)
Evaluates the expressions associated with the dataset.
|
protected abstract void |
customIncrement()
Increments the dataset by collecting the result of the expression
evaluation.
|
protected abstract void |
customInitialize()
Initializes the element dataset.
|
protected void |
evaluate(JRCalculator calculator) |
void |
evaluateDatasetRun(byte evaluation) |
protected void |
evaluateIncrementWhenExpression(JRCalculator calculator) |
JRDatasetRun |
getDatasetRun()
Returns the sub dataset run for this chart dataset.
|
JRFillDataset |
getFillDataset() |
protected JRBaseFiller |
getFiller() |
JRGroup |
getIncrementGroup()
Gets the selected increment group in case of increment type group.
|
IncrementTypeEnum |
getIncrementTypeValue()
Returns the increment type.
|
JRExpression |
getIncrementWhenExpression()
Returns the "increment when" expression.
|
JRFillDataset |
getInputDataset() |
protected Locale |
getLocale() |
JRGroup |
getResetGroup()
Gets the selected reset group in case of reset type group.
|
ResetTypeEnum |
getResetTypeValue()
Gets the reset type.
|
protected TimeZone |
getTimeZone() |
protected void |
increment() |
protected void |
initialize() |
protected void |
setBand(JRFillBand band) |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcollectExpressionsprotected JRElementDataset parent
protected JRGroup resetGroup
protected JRGroup incrementGroup
protected JRFillDatasetRun datasetRun
protected JRFillElementDataset(JRElementDataset dataset, JRFillObjectFactory factory)
protected void setBand(JRFillBand band)
public ResetTypeEnum getResetTypeValue()
JRElementDatasetgetResetTypeValue in interface JRElementDatasetResetTypeEnumpublic IncrementTypeEnum getIncrementTypeValue()
JRElementDatasetgetIncrementTypeValue in interface JRElementDatasetIncrementTypeEnum.public JRGroup getResetGroup()
JRElementDatasetgetResetGroup in interface JRElementDatasetpublic JRGroup getIncrementGroup()
JRElementDatasetgetIncrementGroup in interface JRElementDatasetprotected JRBaseFiller getFiller()
protected Locale getLocale()
protected TimeZone getTimeZone()
protected void initialize()
protected void evaluate(JRCalculator calculator) throws JRExpressionEvalException
JRExpressionEvalExceptionprotected void evaluateIncrementWhenExpression(JRCalculator calculator) throws JRExpressionEvalException
JRExpressionEvalExceptionprotected void increment()
protected abstract void customInitialize()
The dataset is initialized before being used and after each time the dataset gets reset.
getResetTypeValue()protected abstract void customEvaluate(JRCalculator calculator) throws JRExpressionEvalException
Usually, the result of the evaluation would be preserved so that it is
used in customIncrement()
calculator - used to evaluate expressionsJRExpressionEvalException - any exception that occurs while
evaluating expressionsprotected abstract void customIncrement()
public JRDatasetRun getDatasetRun()
JRElementDatasetgetDatasetRun in interface JRElementDatasetpublic void evaluateDatasetRun(byte evaluation)
throws JRException
JRExceptionpublic JRFillDataset getInputDataset()
public JRExpression getIncrementWhenExpression()
JRElementDatasetThis expression determines whether a dataset will be incremented or not.
The expression (if not null) is evaluated before each increment of the dataset.
The increment will be carried on only when the result of the evaluation is Boolean.TRUE;
if the result is null or false, the increment will not be performed.
getIncrementWhenExpression in interface JRElementDatasetpublic Object clone()
clone in interface JRCloneableclone in class Objectpublic JRFillDataset getFillDataset()
Copyright © 2017. All rights reserved.