Class JRFillDataset
- java.lang.Object
-
- net.sf.jasperreports.engine.fill.JRFillDataset
-
- All Implemented Interfaces:
java.lang.Cloneable,DatasetFillContext,JRCloneable,JRDataset,JRIdentifiable,JRPropertiesHolder
public class JRFillDataset extends java.lang.Object implements JRDataset, DatasetFillContext
- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static interfaceJRFillDataset.CacheRecordIndexCallbackprotected static classJRFillDataset.CacheRecordIndexChainedCallbackprotected static classJRFillDataset.FillDatasetPositionRecordIndexCallbackprotected static classJRFillDataset.VariableCalculationReqClass used to hold expression calculation requirements.
-
Field Summary
Fields Modifier and Type Field Description protected JRCalculatorcalculatorThe calculator used by the dataset.protected DatasetRecorderdataRecorderprotected JRDataSourcedataSourceThe data source.protected JRAbstractScriptletdelegateScriptletprotected JRFillElementDataset[]elementDatasetsThe element datasets.static java.lang.StringEXCEPTION_MESSAGE_KEY_NO_SUCH_FIELDstatic java.lang.StringEXCEPTION_MESSAGE_KEY_NO_SUCH_PARAMETERstatic java.lang.StringEXCEPTION_MESSAGE_KEY_NO_SUCH_SNAPSHOT_DATAstatic java.lang.StringEXCEPTION_MESSAGE_KEY_NO_SUCH_SNAPSHOT_PARAMETERstatic java.lang.StringEXCEPTION_MESSAGE_KEY_NO_SUCH_VARIABLEprotected JRFillField[]fieldsThe dataset fields.protected java.util.Map<java.lang.String,JRFillField>fieldsMapThe dataset fields indexed by name.protected FillDatasetPositionfillPositionprotected DatasetFilterfilterprotected JRFillGroup[]groupsThe dataset groups.protected java.util.LocalelocaleTheLocaleto be used by the dataset.protected JRPropertiesMapmergedPropertiesprotected JRFillElementDataset[]origElementDatasetsUsed to save the original element datasets whenfilterElementDatasetsis called.protected JRFillParameter[]parametersThe dataset parameters.protected java.util.Map<java.lang.String,JRFillParameter>parametersMapThe dataset parameters indexed by name.protected java.util.List<DatasetPropertyExpression>propertyExpressionsprotected JRQueryqueryThe dataset query.protected intreportCountThe cursor used when iterating the data source.protected java.lang.IntegerreportMaxCountThe value of themax countparameter.protected java.util.ResourceBundleresourceBundleThe loaded resource bundle.protected java.lang.StringresourceBundleBaseNameThe resource bundle base name.protected java.lang.StringscriptletClassNameThe scriptlet class name.protected java.util.List<JRAbstractScriptlet>scriptletsThe scriptlets used by the dataset.protected JRPropertiesMapstaticPropertiesprotected java.util.TimeZonetimeZoneTheTimeZoneto be used by the dataset.protected java.util.Set<JRFillDataset.VariableCalculationReq>variableCalculationReqsSet ofVariableCalculationReqobjects.protected JRFillVariable[]variablesThe dataset variables.protected java.util.Map<java.lang.String,JRFillVariable>variablesMapThe dataset variables indexed by name.protected WhenResourceMissingTypeEnumwhenResourceMissingTypeThe resource missing handle type.
-
Constructor Summary
Constructors Constructor Description JRFillDataset(BaseReportFiller filler, JRDataset dataset, JRFillObjectFactory factory)Creates a fill dataset object.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddCacheRecordIndexCallback(int recordIndex, JRFillDataset.CacheRecordIndexCallback callback)protected voidaddVariableCalculationReq(java.lang.String variableName, CalculationEnum calculation)Adds a variable calculation requirement.protected voidadvanceCacheRecordIndexes()protected booleanadvanceDataSource(boolean limit)protected voidcacheEnd()protected voidcacheInit()protected voidcacheInitRecording()protected voidcacheInitSnapshot()protected voidcacheRecord()protected voidcheckVariableCalculationReqs(JRFillObjectFactory factory)Checks if there are variable calculation requirements and creates the required variables.java.lang.Objectclone()voidcloseDatasource()Closes the data source used by this dataset if this data source was obtained via a query executer.protected voidcloseQueryExecuter()voidcontributeParameters(java.util.Map<java.lang.String,java.lang.Object> parameterValues)voidcreateCalculator(JasperReport jasperReport)Creates the calculatorprotected static JRCalculatorcreateCalculator(JasperReportsContext jasperReportsContext, JasperReport jasperReport, JRDataset dataset)protected java.util.List<JRAbstractScriptlet>createScriptlets(java.util.Map<java.lang.String,java.lang.Object> parameterValues)Creates the scriptlets.protected java.util.LocaledefaultLocale()protected java.util.TimeZonedefaultTimeZone()voiddisposeParameterContributors()java.lang.ObjectevaluateExpression(JRExpression expression, byte evaluation)Evaluates an expressionvoidevaluateFieldProperties()protected voidevaluateProperties(PropertyEvaluationTimeEnum evaluationTime)protected voidfilterElementDatasets(JRFillElementDataset elementDataset)Filters the element datasets, leaving only one.FillDatasetPositiongetDatasetPosition()protected ParameterEvaluationTimeEnumgetDefaultParameterEvaluationTime()protected PropertyEvaluationTimeEnumgetDefaultPropertyEvaluationTime()JRField[]getFields()Returns the dataset's fields.java.util.Map<java.lang.String,JRFillField>getFieldsMap()java.lang.ObjectgetFieldValue(java.lang.String fieldName)Returns the value of a field.java.lang.ObjectgetFieldValue(java.lang.String fieldName, EvaluationType evaluation)Returns the value of a field.BaseReportFillergetFiller()JRFillFieldgetFillField(java.lang.String fieldName)FillDatasetPositiongetFillPosition()JRFillVariablegetFillVariable(java.lang.String variableName)JRExpressiongetFilterExpression()Returns the dataset filter expression.JRGroup[]getGroups()Returns the dataset's groups.JasperReportsContextgetJasperReportsContext()java.util.LocalegetLocale()Returns the locale used by the dataset.java.lang.StringgetName()Returns the dataset name.JRParameter[]getParameters()Returns the dataset's parameters.java.util.Map<java.lang.String,JRFillParameter>getParametersMap()java.lang.ObjectgetParameterValue(java.lang.String parameterName)Returns the value of a parameter.java.lang.ObjectgetParameterValue(java.lang.String parameterName, boolean ignoreMissing)Returns the value of a parameter.protected java.util.Map<java.lang.String,java.lang.Object>getParameterValuesMap()Returns the map of parameter values.JRPropertiesHoldergetParentProperties()Returns the parent properties holder, whose properties are used as defaults for this object.JRPropertiesMapgetPropertiesMap()Returns this object's properties map.DatasetPropertyExpression[]getPropertyExpressions()Returns the list of dynamic/expression-based properties for this dataset.JRQuerygetQuery()Returns the query of the dataset.RepositoryContextgetRepositoryContext()java.lang.StringgetResourceBundle()Returns the resource bundle base name.java.lang.StringgetScriptletClass()The name of the scriptlet class to be used when iterating this dataset.JRScriptlet[]getScriptlets()Returns the dataset's scriptlets.JRSortField[]getSortFields()Returns the dataset's sort fields.java.util.TimeZonegetTimeZone()java.util.UUIDgetUUID()JRFillVariablegetVariable(java.lang.String variableName)JRVariable[]getVariables()Returns the dataset's variables.java.util.Map<java.lang.String,JRFillVariable>getVariablesMap()java.lang.ObjectgetVariableValue(java.lang.String variableName)Returns the value of a variable.java.lang.ObjectgetVariableValue(java.lang.String variableName, EvaluationType evaluation)Returns the value of a variable.WhenResourceMissingTypeEnumgetWhenResourceMissingTypeValue()Returns the resource missing handling type.booleanhasProperties()Checks whether the object has any properties.voidinheritFromMain()Inherits properties from the report.voidinitCalculator()Initializes the calculator.voidinitDatasource()Initializes the data source which will be used by this dataset.protected voidinitElementDatasets(JRFillObjectFactory factory)Initializes the element datasets.protected booleanisIncludedInDataCache(JRFillParameter parameter)booleanisMainDataset()Decides whether this dataset is the main report dataset or a sub dataset.booleanisSortingData()protected java.util.ResourceBundleloadResourceBundle()Loads the resource bundle corresponding to the resource bundle base name and locale.booleannext()Moves to the next record in the data source.protected booleannext(boolean sorting)Moves to the next record in the data source.protected voidreset()protected voidresetVariables()protected voidrestoreElementDatasets()Restores the original element datasets.protected voidrevertToOldValues()protected voidrevertVariablesToOldValues()voidsetCacheRecordIndex(FillDatasetPosition position, byte evaluationType)voidsetCacheSkipped(boolean cacheSkipped)protected voidsetCalculator(JRCalculator calculator)voidsetConnectionParameterValue(java.util.Map<java.lang.String,java.lang.Object> parameterValues, java.sql.Connection conn)Sets the JDBC connection to be used.voidsetDatasourceParameterValue(java.util.Map<java.lang.String,java.lang.Object> parameterValues, JRDataSource ds)Sets the data source to be used.voidsetFillPosition(FillDatasetPosition fillPosition)voidsetJasperReportsContext(JasperReportsContext jasperReportsContext)protected voidsetOldValues()voidsetParameter(java.lang.String parameterName, java.lang.Object value)Sets the value of a parameter.protected voidsetParameter(JRFillParameter parameter, java.lang.Object value)Sets the value of the parameter.voidsetParameterValues(java.util.Map<java.lang.String,java.lang.Object> parameterValues)Reads built-in parameter values from the value map.voidsetRepositoryContext(RepositoryContext repositoryContext)voidsetWhenResourceMissingType(WhenResourceMissingTypeEnum whenResourceMissingType)Sets the resource missing handling type.voidstart()Starts the iteration on the data source.
-
-
-
Field Detail
-
EXCEPTION_MESSAGE_KEY_NO_SUCH_FIELD
public static final java.lang.String EXCEPTION_MESSAGE_KEY_NO_SUCH_FIELD
- See Also:
- Constant Field Values
-
EXCEPTION_MESSAGE_KEY_NO_SUCH_PARAMETER
public static final java.lang.String EXCEPTION_MESSAGE_KEY_NO_SUCH_PARAMETER
- See Also:
- Constant Field Values
-
EXCEPTION_MESSAGE_KEY_NO_SUCH_SNAPSHOT_DATA
public static final java.lang.String EXCEPTION_MESSAGE_KEY_NO_SUCH_SNAPSHOT_DATA
- See Also:
- Constant Field Values
-
EXCEPTION_MESSAGE_KEY_NO_SUCH_SNAPSHOT_PARAMETER
public static final java.lang.String EXCEPTION_MESSAGE_KEY_NO_SUCH_SNAPSHOT_PARAMETER
- See Also:
- Constant Field Values
-
EXCEPTION_MESSAGE_KEY_NO_SUCH_VARIABLE
public static final java.lang.String EXCEPTION_MESSAGE_KEY_NO_SUCH_VARIABLE
- See Also:
- Constant Field Values
-
query
protected JRQuery query
The dataset query.
-
parameters
protected JRFillParameter[] parameters
The dataset parameters.
-
parametersMap
protected java.util.Map<java.lang.String,JRFillParameter> parametersMap
The dataset parameters indexed by name.
-
fields
protected JRFillField[] fields
The dataset fields.
-
fieldsMap
protected java.util.Map<java.lang.String,JRFillField> fieldsMap
The dataset fields indexed by name.
-
variables
protected JRFillVariable[] variables
The dataset variables.
-
variablesMap
protected java.util.Map<java.lang.String,JRFillVariable> variablesMap
The dataset variables indexed by name.
-
variableCalculationReqs
protected java.util.Set<JRFillDataset.VariableCalculationReq> variableCalculationReqs
Set ofVariableCalculationReqobjects.
-
elementDatasets
protected JRFillElementDataset[] elementDatasets
The element datasets.
-
origElementDatasets
protected JRFillElementDataset[] origElementDatasets
Used to save the original element datasets whenfilterElementDatasetsis called.
-
groups
protected JRFillGroup[] groups
The dataset groups.
-
resourceBundleBaseName
protected java.lang.String resourceBundleBaseName
The resource bundle base name.
-
whenResourceMissingType
protected WhenResourceMissingTypeEnum whenResourceMissingType
The resource missing handle type.
-
scriptletClassName
protected java.lang.String scriptletClassName
The scriptlet class name.
-
dataSource
protected JRDataSource dataSource
The data source.
-
locale
protected java.util.Locale locale
TheLocaleto be used by the dataset.
-
resourceBundle
protected java.util.ResourceBundle resourceBundle
The loaded resource bundle.
-
timeZone
protected java.util.TimeZone timeZone
TheTimeZoneto be used by the dataset.
-
reportCount
protected int reportCount
The cursor used when iterating the data source.
-
calculator
protected JRCalculator calculator
The calculator used by the dataset.
-
scriptlets
protected java.util.List<JRAbstractScriptlet> scriptlets
The scriptlets used by the dataset.
-
propertyExpressions
protected java.util.List<DatasetPropertyExpression> propertyExpressions
-
staticProperties
protected JRPropertiesMap staticProperties
-
mergedProperties
protected JRPropertiesMap mergedProperties
-
delegateScriptlet
protected JRAbstractScriptlet delegateScriptlet
-
reportMaxCount
protected java.lang.Integer reportMaxCount
The value of themax countparameter.
-
filter
protected DatasetFilter filter
-
fillPosition
protected FillDatasetPosition fillPosition
-
dataRecorder
protected DatasetRecorder dataRecorder
-
-
Constructor Detail
-
JRFillDataset
public JRFillDataset(BaseReportFiller filler, JRDataset dataset, JRFillObjectFactory factory)
Creates a fill dataset object.- Parameters:
filler- the fillerdataset- the template datasetfactory- the fill object factory
-
-
Method Detail
-
getFiller
public BaseReportFiller getFiller()
-
createCalculator
public void createCalculator(JasperReport jasperReport) throws JRException
Creates the calculator- Parameters:
jasperReport- the report- Throws:
JRException
-
setCalculator
protected void setCalculator(JRCalculator calculator)
-
createCalculator
protected static JRCalculator createCalculator(JasperReportsContext jasperReportsContext, JasperReport jasperReport, JRDataset dataset) throws JRException
- Throws:
JRException
-
initCalculator
public void initCalculator() throws JRExceptionInitializes the calculator.- Throws:
JRException
-
inheritFromMain
public void inheritFromMain()
Inherits properties from the report.
-
createScriptlets
protected java.util.List<JRAbstractScriptlet> createScriptlets(java.util.Map<java.lang.String,java.lang.Object> parameterValues) throws JRException
Creates the scriptlets.- Returns:
- the scriptlets list
- Throws:
JRException
-
initElementDatasets
protected void initElementDatasets(JRFillObjectFactory factory)
Initializes the element datasets.- Parameters:
factory- the fill object factory used by the filler
-
filterElementDatasets
protected void filterElementDatasets(JRFillElementDataset elementDataset)
Filters the element datasets, leaving only one.This method is used when a dataset is instantiated by a chart or crosstab.
- Parameters:
elementDataset- the element dataset that should remain
-
restoreElementDatasets
protected void restoreElementDatasets()
Restores the original element datasets.This method should be called after
filterElementDatasets.
-
loadResourceBundle
protected java.util.ResourceBundle loadResourceBundle()
Loads the resource bundle corresponding to the resource bundle base name and locale.
-
setParameterValues
public void setParameterValues(java.util.Map<java.lang.String,java.lang.Object> parameterValues) throws JRExceptionReads built-in parameter values from the value map.- Parameters:
parameterValues- the parameter values- Throws:
JRException
-
defaultLocale
protected java.util.Locale defaultLocale()
-
defaultTimeZone
protected java.util.TimeZone defaultTimeZone()
-
initDatasource
public void initDatasource() throws JRExceptionInitializes the data source which will be used by this dataset. If the dataset includes a query, this involves invoking the appropriate query executer to execute the query and create a data source from the results.- Throws:
JRException
-
isSortingData
public boolean isSortingData()
-
getFillPosition
public FillDatasetPosition getFillPosition()
-
setFillPosition
public void setFillPosition(FillDatasetPosition fillPosition)
-
setCacheSkipped
public void setCacheSkipped(boolean cacheSkipped)
-
cacheInit
protected void cacheInit() throws DataSnapshotException- Throws:
DataSnapshotException
-
cacheInitSnapshot
protected void cacheInitSnapshot() throws DataSnapshotException- Throws:
DataSnapshotException
-
cacheInitRecording
protected void cacheInitRecording()
-
isIncludedInDataCache
protected boolean isIncludedInDataCache(JRFillParameter parameter)
-
getDefaultParameterEvaluationTime
protected ParameterEvaluationTimeEnum getDefaultParameterEvaluationTime()
-
getDefaultPropertyEvaluationTime
protected PropertyEvaluationTimeEnum getDefaultPropertyEvaluationTime()
-
cacheRecord
protected void cacheRecord()
-
cacheEnd
protected void cacheEnd()
-
evaluateFieldProperties
public void evaluateFieldProperties() throws JRException- Throws:
JRException
-
contributeParameters
public void contributeParameters(java.util.Map<java.lang.String,java.lang.Object> parameterValues) throws JRException- Throws:
JRException
-
setJasperReportsContext
public void setJasperReportsContext(JasperReportsContext jasperReportsContext)
-
setRepositoryContext
public void setRepositoryContext(RepositoryContext repositoryContext)
-
getJasperReportsContext
public JasperReportsContext getJasperReportsContext()
-
getRepositoryContext
public RepositoryContext getRepositoryContext()
-
disposeParameterContributors
public void disposeParameterContributors()
-
getParameterValuesMap
protected java.util.Map<java.lang.String,java.lang.Object> getParameterValuesMap()
Returns the map of parameter values.- Returns:
- the map of parameter values
-
reset
protected void reset()
-
setDatasourceParameterValue
public void setDatasourceParameterValue(java.util.Map<java.lang.String,java.lang.Object> parameterValues, JRDataSource ds)Sets the data source to be used.- Parameters:
parameterValues- the parameter valuesds- the data source
-
setConnectionParameterValue
public void setConnectionParameterValue(java.util.Map<java.lang.String,java.lang.Object> parameterValues, java.sql.Connection conn)Sets the JDBC connection to be used.- Parameters:
parameterValues- the parameter valuesconn- the connection
-
closeDatasource
public void closeDatasource()
Closes the data source used by this dataset if this data source was obtained via a query executer.- See Also:
JRQueryExecuter.close()
-
closeQueryExecuter
protected void closeQueryExecuter()
-
start
public void start()
Starts the iteration on the data source.
-
resetVariables
protected void resetVariables()
-
next
public boolean next() throws JRExceptionMoves to the next record in the data source.- Returns:
trueif the data source was not exhausted- Throws:
JRException
-
next
protected boolean next(boolean sorting) throws JRExceptionMoves to the next record in the data source.- Parameters:
sorting- whether the method is called as part of the data sorting phase- Returns:
trueif the data source was not exhausted- Throws:
JRException
-
advanceCacheRecordIndexes
protected void advanceCacheRecordIndexes()
-
setOldValues
protected void setOldValues() throws JRException- Throws:
JRException
-
revertToOldValues
protected void revertToOldValues()
-
revertVariablesToOldValues
protected void revertVariablesToOldValues()
-
advanceDataSource
protected boolean advanceDataSource(boolean limit) throws JRException- Throws:
JRException
-
setParameter
public void setParameter(java.lang.String parameterName, java.lang.Object value) throws JRExceptionSets the value of a parameter.- Parameters:
parameterName- the parameter namevalue- the value- Throws:
JRException
-
setParameter
protected void setParameter(JRFillParameter parameter, java.lang.Object value) throws JRException
Sets the value of the parameter.- Parameters:
parameter- the parametervalue- the value- Throws:
JRException
-
getVariable
public JRFillVariable getVariable(java.lang.String variableName)
-
getVariableValue
public java.lang.Object getVariableValue(java.lang.String variableName)
Returns the value of a variable.- Parameters:
variableName- the variable name- Returns:
- the variable value
-
getVariableValue
public java.lang.Object getVariableValue(java.lang.String variableName, EvaluationType evaluation)Description copied from interface:DatasetFillContextReturns the value of a variable.- Specified by:
getVariableValuein interfaceDatasetFillContext- Parameters:
variableName- the variable nameevaluation- the evaluation type- Returns:
- the variable value
-
getFillVariable
public JRFillVariable getFillVariable(java.lang.String variableName)
-
getParameterValue
public java.lang.Object getParameterValue(java.lang.String parameterName)
Returns the value of a parameter.- Specified by:
getParameterValuein interfaceDatasetFillContext- Parameters:
parameterName- the parameter name- Returns:
- the parameter value
-
getParameterValue
public java.lang.Object getParameterValue(java.lang.String parameterName, boolean ignoreMissing)Returns the value of a parameter.- Parameters:
parameterName- the parameter nameignoreMissing- if set,nullwill be returned for inexisting parameters- Returns:
- the parameter value
-
getFieldValue
public java.lang.Object getFieldValue(java.lang.String fieldName)
Returns the value of a field.- Parameters:
fieldName- the field name- Returns:
- the field value
-
getFieldValue
public java.lang.Object getFieldValue(java.lang.String fieldName, EvaluationType evaluation)Description copied from interface:DatasetFillContextReturns the value of a field.- Specified by:
getFieldValuein interfaceDatasetFillContext- Parameters:
fieldName- the field nameevaluation- the evaluation type- Returns:
- the field value
-
getFillField
public JRFillField getFillField(java.lang.String fieldName)
-
addVariableCalculationReq
protected void addVariableCalculationReq(java.lang.String variableName, CalculationEnum calculation)Adds a variable calculation requirement.- Parameters:
variableName- the variable namecalculation- the required calculation
-
checkVariableCalculationReqs
protected void checkVariableCalculationReqs(JRFillObjectFactory factory)
Checks if there are variable calculation requirements and creates the required variables.- Parameters:
factory- the fill object factory
-
getUUID
public java.util.UUID getUUID()
- Specified by:
getUUIDin interfaceJRIdentifiable
-
getName
public java.lang.String getName()
Description copied from interface:JRDatasetReturns the dataset name.
-
getScriptletClass
public java.lang.String getScriptletClass()
Description copied from interface:JRDatasetThe name of the scriptlet class to be used when iterating this dataset.- Specified by:
getScriptletClassin interfaceJRDataset- Returns:
- the scriplet class name
-
getScriptlets
public JRScriptlet[] getScriptlets()
Description copied from interface:JRDatasetReturns the dataset's scriptlets.- Specified by:
getScriptletsin interfaceJRDataset- Returns:
- the dataset's scriptlets
-
getParameters
public JRParameter[] getParameters()
Description copied from interface:JRDatasetReturns the dataset's parameters.- Specified by:
getParametersin interfaceJRDataset- Returns:
- the dataset's parameters
-
getParametersMap
public java.util.Map<java.lang.String,JRFillParameter> getParametersMap()
-
getQuery
public JRQuery getQuery()
Description copied from interface:JRDatasetReturns the query of the dataset.The query is used by passing a connection is passed to the dataset when instantiating.
-
getFields
public JRField[] getFields()
Description copied from interface:JRDatasetReturns the dataset's fields.
-
getFieldsMap
public java.util.Map<java.lang.String,JRFillField> getFieldsMap()
-
getSortFields
public JRSortField[] getSortFields()
Description copied from interface:JRDatasetReturns the dataset's sort fields.- Specified by:
getSortFieldsin interfaceJRDataset- Returns:
- the dataset's sort fields
-
getVariables
public JRVariable[] getVariables()
Description copied from interface:JRDatasetReturns the dataset's variables.- Specified by:
getVariablesin interfaceJRDataset- Returns:
- the dataset's variables
-
getVariablesMap
public java.util.Map<java.lang.String,JRFillVariable> getVariablesMap()
-
getGroups
public JRGroup[] getGroups()
Description copied from interface:JRDatasetReturns the dataset's groups.
-
isMainDataset
public boolean isMainDataset()
Description copied from interface:JRDatasetDecides whether this dataset is the main report dataset or a sub dataset.- Specified by:
isMainDatasetin interfaceJRDataset- Returns:
trueif and only if this dataset is the main report dataset
-
getResourceBundle
public java.lang.String getResourceBundle()
Description copied from interface:JRDatasetReturns the resource bundle base name.The resource bundle is used when evaluating expressions.
- Specified by:
getResourceBundlein interfaceJRDataset- Returns:
- the resource bundle base name
-
getWhenResourceMissingTypeValue
public WhenResourceMissingTypeEnum getWhenResourceMissingTypeValue()
Description copied from interface:JRDatasetReturns the resource missing handling type.- Specified by:
getWhenResourceMissingTypeValuein interfaceJRDataset- Returns:
- the resource missing handling type
-
setWhenResourceMissingType
public void setWhenResourceMissingType(WhenResourceMissingTypeEnum whenResourceMissingType)
Description copied from interface:JRDatasetSets the resource missing handling type.- Specified by:
setWhenResourceMissingTypein interfaceJRDataset- Parameters:
whenResourceMissingType- the resource missing handling type
-
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
-
getPropertyExpressions
public DatasetPropertyExpression[] getPropertyExpressions()
Description copied from interface:JRDatasetReturns the list of dynamic/expression-based properties for this dataset.- Specified by:
getPropertyExpressionsin interfaceJRDataset- Returns:
- an array containing the expression-based properties of this dataset
-
evaluateProperties
protected void evaluateProperties(PropertyEvaluationTimeEnum evaluationTime) throws JRException
- Throws:
JRException
-
getFilterExpression
public JRExpression getFilterExpression()
Description copied from interface:JRDatasetReturns the dataset filter expression.This expression is used to filter the rows of the
data sourcethat this dataset will iterate on.This expression (if not null) is evaluated immediately after a new row is
producedby the data source. The evaluation is performed using field and variable values corresponding to the new row. When the result of the evaluation isBoolean.TRUEthe row gets processed by the report filling engine. When the result is null orBoolean.FALSE, the current row will be skipped and the datasource will be asked for the next row.- Specified by:
getFilterExpressionin interfaceJRDataset- Returns:
- the dataset filter expression
-
clone
public java.lang.Object clone()
- Specified by:
clonein interfaceJRCloneable- Overrides:
clonein classjava.lang.Object
-
evaluateExpression
public java.lang.Object evaluateExpression(JRExpression expression, byte evaluation) throws JRException
Evaluates an expression- Parameters:
expression- the expressionevaluation- the evaluation type- Returns:
- the evaluation result
- Throws:
JRException
-
getLocale
public java.util.Locale getLocale()
Description copied from interface:DatasetFillContextReturns the locale used by the dataset.- Specified by:
getLocalein interfaceDatasetFillContext
-
getTimeZone
public java.util.TimeZone getTimeZone()
-
getDatasetPosition
public FillDatasetPosition getDatasetPosition()
-
addCacheRecordIndexCallback
protected void addCacheRecordIndexCallback(int recordIndex, JRFillDataset.CacheRecordIndexCallback callback)
-
setCacheRecordIndex
public void setCacheRecordIndex(FillDatasetPosition position, byte evaluationType)
-
-