Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.sf.jasperreports.engine
Interface JRDataset

All Superinterfaces:
  java.lang.Cloneable, JRCloneable, JRPropertiesHolder

All Known Implementing Classes:
  JRBaseDataset, JRDesignDataset, JRFillDataset, TableReportDataset

    public interface JRDataset

extends JRPropertiesHolder, JRCloneable

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 3507 2010-03-04 15:02:09Z teodord $
Author:
  Lucian Chirita (lucianc@users.sourceforge.net)
See Also:
  `JRDatasetRun`, `JRReport.getMainDataset()`, `JRReport.getDatasets()`

Field Summary
`static byte` | `WHEN_RESOURCE_MISSING_TYPE_EMPTY` Deprecated. Replaced by `WhenResourceMissingTypeEnum.EMPTY`.
`static byte` | `WHEN_RESOURCE_MISSING_TYPE_ERROR` Deprecated. Replaced by `WhenResourceMissingTypeEnum.ERROR`.
`static byte` | `WHEN_RESOURCE_MISSING_TYPE_KEY` Deprecated. Replaced by `WhenResourceMissingTypeEnum.KEY`.
`static byte` | `WHEN_RESOURCE_MISSING_TYPE_NULL` Deprecated. Replaced by `WhenResourceMissingTypeEnum.NULL`.

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.
`byte` | `getWhenResourceMissingType()` Deprecated. Replaced by `getWhenResourceMissingTypeValue()`.
`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(byte whenResourceMissingType)` Deprecated. Replaced by `setWhenResourceMissingType(WhenResourceMissingTypeEnum)`.
`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`

Field Detail

### WHEN_RESOURCE_MISSING_TYPE_NULL

    static final byte WHEN_RESOURCE_MISSING_TYPE_NULL

  Deprecated. Replaced by `WhenResourceMissingTypeEnum.NULL`.
  Return NULL when a resource is missing.

  See Also:
    Constant Field Values

### WHEN_RESOURCE_MISSING_TYPE_EMPTY

    static final byte WHEN_RESOURCE_MISSING_TYPE_EMPTY

  Deprecated. Replaced by `WhenResourceMissingTypeEnum.EMPTY`.
  Return empty string when a resource is missing.

  See Also:
    Constant Field Values

### WHEN_RESOURCE_MISSING_TYPE_KEY

    static final byte WHEN_RESOURCE_MISSING_TYPE_KEY

  Deprecated. Replaced by `WhenResourceMissingTypeEnum.KEY`.
  Return the key when a resource is missing.

  See Also:
    Constant Field Values

### WHEN_RESOURCE_MISSING_TYPE_ERROR

    static final byte WHEN_RESOURCE_MISSING_TYPE_ERROR

  Deprecated. Replaced by `WhenResourceMissingTypeEnum.ERROR`.
  Throw an exception when a resource is missing.

  See Also:
    Constant Field Values

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

### getWhenResourceMissingType

    byte getWhenResourceMissingType()

  Deprecated. Replaced by `getWhenResourceMissingTypeValue()`.

### getWhenResourceMissingTypeValue

    WhenResourceMissingTypeEnum getWhenResourceMissingTypeValue()

  Returns the resource missing handling type.

  Returns:
    the resource missing handling type

### setWhenResourceMissingType

    void setWhenResourceMissingType(byte whenResourceMissingType)

  Deprecated. Replaced by `setWhenResourceMissingType(WhenResourceMissingTypeEnum)`.

### 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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

© 2001-2010 Jaspersoft Corporation www.jaspersoft.com