net.sf.jasperreports.engine
Interface JRDataset

All Superinterfaces:
java.lang.Cloneable, JRCloneable, JRIdentifiable, JRPropertiesHolder
All Known Implementing Classes:
JRBaseDataset, JRDesignDataset, JRFillDataset, TableReportDataset

public interface JRDataset
extends JRPropertiesHolder, JRCloneable, JRIdentifiable

Interface representing a data set that can be used in a report.

A data set consists of parameters, fields, variables, groups and an optional query. When a data set gets instantiated, parameter values and a data source is passed to it.

A report has one main data set and multiple sub data sets that can be instantiated by charts and crosstabs.

Version:
$Id: JRDataset.java 5337 2012-05-04 09:15:58Z lucianc $
Author:
Lucian Chirita (lucianc@users.sourceforge.net)
See Also:
JRDatasetRun, JRReport.getMainDataset(), JRReport.getDatasets()

Method Summary
 JRField[] getFields()
          Returns the dataset's fields.
 JRExpression getFilterExpression()
          Returns the dataset filter expression.
 JRGroup[] getGroups()
          Returns the dataset's groups.
 java.lang.String getName()
          Returns the dataset name.
 JRParameter[] getParameters()
          Returns the dataset's parameters.
 JRQuery getQuery()
          Returns the query of the dataset.
 java.lang.String getResourceBundle()
          Returns the resource bundle base name.
 java.lang.String getScriptletClass()
          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.
 JRVariable[] getVariables()
          Returns the dataset's variables.
 WhenResourceMissingTypeEnum getWhenResourceMissingTypeValue()
          Returns the resource missing handling type.
 boolean isMainDataset()
          Decides whether this dataset is the main report dataset or a sub dataset.
 void setWhenResourceMissingType(WhenResourceMissingTypeEnum whenResourceMissingType)
          Sets the resource missing handling type.
 
Methods inherited from interface net.sf.jasperreports.engine.JRPropertiesHolder
getParentProperties, getPropertiesMap, hasProperties
 
Methods inherited from interface net.sf.jasperreports.engine.JRCloneable
clone
 
Methods inherited from interface net.sf.jasperreports.engine.JRIdentifiable
getUUID
 

Method Detail

getName

java.lang.String getName()
Returns the dataset name.

Returns:
the name of the dataset

getScriptletClass

java.lang.String getScriptletClass()
The name of the scriptlet class to be used when iterating this dataset.

Returns:
the scriplet class name

getScriptlets

JRScriptlet[] getScriptlets()
Returns the dataset's scriptlets.

Returns:
the dataset's scriptlets

getParameters

JRParameter[] getParameters()
Returns the dataset's parameters.

Returns:
the dataset's parameters

getQuery

JRQuery getQuery()
Returns the query of the dataset.

The query is used by passing a connection is passed to the dataset when instantiating.

Returns:
the query of the dataset

getFields

JRField[] getFields()
Returns the dataset's fields.

Returns:
the dataset's fields

getSortFields

JRSortField[] getSortFields()
Returns the dataset's sort fields.

Returns:
the dataset's sort fields

getVariables

JRVariable[] getVariables()
Returns the dataset's variables.

Returns:
the dataset's variables

getGroups

JRGroup[] getGroups()
Returns the dataset's groups.

Returns:
the dataset's groups

isMainDataset

boolean isMainDataset()
Decides whether this dataset is the main report dataset or a sub dataset.

Returns:
true if and only if this dataset is the main report dataset

getResourceBundle

java.lang.String getResourceBundle()
Returns the resource bundle base name.

The resource bundle is used when evaluating expressions.

Returns:
the resource bundle base name

getWhenResourceMissingTypeValue

WhenResourceMissingTypeEnum getWhenResourceMissingTypeValue()
Returns the resource missing handling type.

Returns:
the resource missing handling type

setWhenResourceMissingType

void setWhenResourceMissingType(WhenResourceMissingTypeEnum whenResourceMissingType)
Sets the resource missing handling type.

Parameters:
whenResourceMissingType - the resource missing handling type

getFilterExpression

JRExpression getFilterExpression()
Returns the dataset filter expression.

This expression is used to filter the rows of the data source that this dataset will iterate on.

This expression (if not null) is evaluated immediately after a new row is produced by the data source. The evaluation is performed using field and variable values corresponding to the new row. When the result of the evaluation is Boolean.TRUE the row gets processed by the report filling engine. When the result is null or Boolean.FALSE, the current row will be skipped and the datasource will be asked for the next row.

Returns:
the dataset filter expression


© 2001-2010 Jaspersoft Corporation www.jaspersoft.com