Class JRFillElementDataset
- All Implemented Interfaces:
Cloneable,DatasetRunHolder,JRCloneable,JRElementDataset
- Direct Known Subclasses:
FillItemDataset,FillMultiAxisDataset,FillSpiderDataset,JRFillChartDataset,JRFillCrosstab.JRFillCrosstabDataset
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.
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected JRFillDatasetRunprotected Stringprotected JRElementDatasetprotected String -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedJRFillElementDataset(JRFillElementDataset dataset, JRFillCloneFactory factory) protectedJRFillElementDataset(JRElementDataset dataset, JRFillObjectFactory factory) -
Method Summary
Modifier and TypeMethodDescriptionclone()protected abstract voidcustomEvaluate(JRCalculator calculator) Evaluates the expressions associated with the dataset.protected abstract voidIncrements the dataset by collecting the result of the expression evaluation.protected abstract voidInitializes the element dataset.protected voidevaluate(JRCalculator calculator) voidevaluateDatasetRun(byte evaluation) protected voidevaluateIncrementWhenExpression(JRCalculator calculator) Gets the reset type.Returns the sub dataset run for this chart dataset.protected JRBaseFillerGets the selected increment group in case of increment type group.Returns the increment type.Returns the "increment when" expression.protected LocaleGets the selected reset group in case of reset type group.protected TimeZoneprotected voidprotected voidvoidsetBand(JRFillBand band) Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.sf.jasperreports.engine.JRElementDataset
collectExpressions
-
Field Details
-
parent
-
resetGroup
-
incrementGroup
-
datasetRun
-
-
Constructor Details
-
JRFillElementDataset
-
JRFillElementDataset
-
-
Method Details
-
setBand
-
getDatasetResetType
Description copied from interface:JRElementDatasetGets the reset type. This specifies the range of report data used for filling the dataset.- Specified by:
getDatasetResetTypein interfaceJRElementDataset- Returns:
- one of the reset constants in
DatasetResetTypeEnum
-
getIncrementType
Description copied from interface:JRElementDatasetReturns the increment type. This specifies dataset values increment step.- Specified by:
getIncrementTypein interfaceJRElementDataset- Returns:
- one of the increment constants in
IncrementTypeEnum.
-
getResetGroup
Description copied from interface:JRElementDatasetGets the selected reset group in case of reset type group.- Specified by:
getResetGroupin interfaceJRElementDataset
-
getIncrementGroup
Description copied from interface:JRElementDatasetGets the selected increment group in case of increment type group.- Specified by:
getIncrementGroupin interfaceJRElementDataset
-
getFiller
-
getLocale
-
getTimeZone
-
initialize
protected void initialize() -
evaluate
- Throws:
JRExpressionEvalException
-
evaluateIncrementWhenExpression
protected void evaluateIncrementWhenExpression(JRCalculator calculator) throws JRExpressionEvalException - Throws:
JRExpressionEvalException
-
increment
protected void increment() -
customInitialize
protected abstract void customInitialize()Initializes the element dataset.The dataset is initialized before being used and after each time the dataset gets reset.
- See Also:
-
customEvaluate
Evaluates the expressions associated with the dataset.Usually, the result of the evaluation would be preserved so that it is used in
customIncrement()- Parameters:
calculator- used to evaluate expressions- Throws:
JRExpressionEvalException- any exception that occurs while evaluating expressions
-
customIncrement
protected abstract void customIncrement()Increments the dataset by collecting the result of the expression evaluation. -
getDatasetRun
Description copied from interface:JRElementDatasetReturns the sub dataset run for this chart dataset.- Specified by:
getDatasetRunin interfaceDatasetRunHolder- Specified by:
getDatasetRunin interfaceJRElementDataset- Returns:
- the sub dataset run for this chart dataset
-
evaluateDatasetRun
- Throws:
JRException
-
getInputDataset
-
getIncrementWhenExpression
Description copied from interface:JRElementDatasetReturns the "increment when" expression.This 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.- Specified by:
getIncrementWhenExpressionin interfaceJRElementDataset- Returns:
- the "increment when" expression
-
clone
- Specified by:
clonein interfaceJRCloneable- Overrides:
clonein classObject
-
getFillDataset
-