net.sf.jasperreports.engine
Interface JRDataset

All Known Implementing Classes:
JRBaseDataset, JRFillDataset

public interface JRDataset

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,v 1.3 2005/11/28 09:20:43 teodord Exp $
Author:
Lucian Chirita (lucianc@users.sourceforge.net)
See Also:
JRDatasetRun, JRReport.getMainDataset(), JRReport.getDatasets()

Field Summary
static byte WHEN_RESOURCE_MISSING_TYPE_EMPTY
          Return empty string when a resource is missing.
static byte WHEN_RESOURCE_MISSING_TYPE_ERROR
          Throw an exception when a resource is missing.
static byte WHEN_RESOURCE_MISSING_TYPE_KEY
          Return the key when a resource is missing.
static byte WHEN_RESOURCE_MISSING_TYPE_NULL
          Return NULL when a resource is missing.
 
Method Summary
 JRField[] getFields()
          Returns the dataset's fields.
 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.
 JRVariable[] getVariables()
          Returns the dataset's variables.
 byte getWhenResourceMissingType()
          Returns the resource missing handling type.
 boolean isMainDataset()
          Decides whether this dataset is the main report dataset or a sub dataset.
 void setWhenResourceMissingType(byte whenResourceMissingType)
          Sets the resource missing handling type.
 

Field Detail

WHEN_RESOURCE_MISSING_TYPE_NULL

public static final byte WHEN_RESOURCE_MISSING_TYPE_NULL
Return NULL when a resource is missing.

See Also:
Constant Field Values

WHEN_RESOURCE_MISSING_TYPE_EMPTY

public static final byte WHEN_RESOURCE_MISSING_TYPE_EMPTY
Return empty string when a resource is missing.

See Also:
Constant Field Values

WHEN_RESOURCE_MISSING_TYPE_KEY

public static final byte WHEN_RESOURCE_MISSING_TYPE_KEY
Return the key when a resource is missing.

See Also:
Constant Field Values

WHEN_RESOURCE_MISSING_TYPE_ERROR

public static final byte WHEN_RESOURCE_MISSING_TYPE_ERROR
Throw an exception when a resource is missing.

See Also:
Constant Field Values
Method Detail

getName

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

Returns:
the name of the dataset

getScriptletClass

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

Returns:
the scriplet class name

getParameters

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

Returns:
the dataset's parameters

getQuery

public 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

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

Returns:
the dataset's fields

getVariables

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

Returns:
the dataset's variables

getGroups

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

Returns:
the dataset's groups

isMainDataset

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

Returns:
true iff this dataset is the main report dataset

getResourceBundle

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

The resource bundle is used when evaluating expressions.

Returns:
the resource bundle base name

getWhenResourceMissingType

public byte getWhenResourceMissingType()
Returns the resource missing handling type.

Returns:
the resource missing handling type

setWhenResourceMissingType

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

Parameters:
whenResourceMissingType - the resource missing handling type


© 2001-2005 JasperSoft Corporation www.jaspersoft.com