net.sf.jasperreports.engine.base

## Class JRBaseDataset

- java.lang.Object
- - net.sf.jasperreports.engine.base.JRBaseDataset

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, JRChangeEventsSupport, JRCloneable, JRDataset, JRIdentifiable, JRPropertiesHolder
  Direct Known Subclasses:
    JRDesignDataset

      public class JRBaseDataset
      extends java.lang.Object
      implements JRDataset, java.io.Serializable, JRChangeEventsSupport

  The base implementation of `JRDataset`.
  Version:
    $Id: JRBaseDataset.java 5878 2013-01-07 20:23:13Z teodord $
  Author:
    Lucian Chirita (lucianc@users.sourceforge.net)
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected JRField[]` | `fields`
    `protected JRExpression` | `filterExpression`
    `protected JRGroup[]` | `groups`
    `protected boolean` | `isMain`
    `protected java.lang.String` | `name`
    `protected JRParameter[]` | `parameters`
    `protected JRPropertiesMap` | `propertiesMap`
    `static java.lang.String` | `PROPERTY_WHEN_RESOURCE_MISSING_TYPE`
    `protected JRQuery` | `query`
    `protected java.lang.String` | `resourceBundle`
    `protected java.lang.String` | `scriptletClass`
    `protected JRScriptlet[]` | `scriptlets`
    `protected JRSortField[]` | `sortFields`
    `protected java.util.UUID` | `uuid`
    `protected JRVariable[]` | `variables`
    `protected WhenResourceMissingTypeEnum` | `whenResourceMissingTypeValue`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `JRBaseDataset(boolean isMain)`
    `protected` | `JRBaseDataset(JRDataset dataset, JRBaseObjectFactory factory)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `clone()`
    `JRPropertyChangeSupport` | `getEventSupport()` Returns the property change support object for this instance.
    `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.
    `JRPropertiesHolder` | `getParentProperties()` Returns the parent properties holder, whose properties are used as defaults for this object.
    `JRPropertiesMap` | `getPropertiesMap()` Returns this object's properties map.
    `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.
    `java.util.UUID` | `getUUID()`
    `JRVariable[]` | `getVariables()` Returns the dataset's variables.
    `WhenResourceMissingTypeEnum` | `getWhenResourceMissingTypeValue()` Returns the resource missing handling type.
    `boolean` | `hasProperties()` Checks whether the object has any properties.
    `boolean` | `isMainDataset()` Decides whether this dataset is the main report dataset or a sub dataset.
    `void` | `setWhenResourceMissingType(WhenResourceMissingTypeEnum whenResourceMissingTypeValue)` Sets the resource missing handling type.

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### PROPERTY_WHEN_RESOURCE_MISSING_TYPE

          public static final java.lang.String PROPERTY_WHEN_RESOURCE_MISSING_TYPE

      See Also:
        Constant Field Values

    - #### isMain

          protected final boolean isMain

    - #### uuid

          protected java.util.UUID uuid

    - #### name

          protected java.lang.String name

    - #### scriptletClass

          protected java.lang.String scriptletClass

    - #### scriptlets

          protected JRScriptlet[] scriptlets

    - #### parameters

          protected JRParameter[] parameters

    - #### query

          protected JRQuery query

    - #### fields

          protected JRField[] fields

    - #### sortFields

          protected JRSortField[] sortFields

    - #### variables

          protected JRVariable[] variables

    - #### groups

          protected JRGroup[] groups

    - #### resourceBundle

          protected java.lang.String resourceBundle

    - #### whenResourceMissingTypeValue

          protected WhenResourceMissingTypeEnum whenResourceMissingTypeValue

    - #### propertiesMap

          protected JRPropertiesMap propertiesMap

    - #### filterExpression

          protected JRExpression filterExpression

  - ### Constructor Detail

    - #### JRBaseDataset

          protected JRBaseDataset(boolean isMain)

    - #### JRBaseDataset

          protected JRBaseDataset(JRDataset dataset,
                       JRBaseObjectFactory factory)

  - ### Method Detail

    - #### getUUID

          public java.util.UUID getUUID()

      Specified by:
        `getUUID` in interface `JRIdentifiable`

    - #### getName

          public java.lang.String getName()

      Description copied from interface: `JRDataset`
      Returns the dataset name.
      Specified by:
        `getName` in interface `JRDataset`
      Returns:
        the name of the dataset

    - #### getScriptletClass

          public java.lang.String getScriptletClass()

      Description copied from interface: `JRDataset`
      The name of the scriptlet class to be used when iterating this dataset.
      Specified by:
        `getScriptletClass` in interface `JRDataset`
      Returns:
        the scriplet class name

    - #### getQuery

          public JRQuery getQuery()

      Description copied from interface: `JRDataset`
      Returns the query of the dataset.

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

      Specified by:
        `getQuery` in interface `JRDataset`
      Returns:
        the query of the dataset

    - #### getScriptlets

          public JRScriptlet[] getScriptlets()

      Description copied from interface: `JRDataset`
      Returns the dataset's scriptlets.
      Specified by:
        `getScriptlets` in interface `JRDataset`
      Returns:
        the dataset's scriptlets

    - #### getParameters

          public JRParameter[] getParameters()

      Description copied from interface: `JRDataset`
      Returns the dataset's parameters.
      Specified by:
        `getParameters` in interface `JRDataset`
      Returns:
        the dataset's parameters

    - #### getFields

          public JRField[] getFields()

      Description copied from interface: `JRDataset`
      Returns the dataset's fields.
      Specified by:
        `getFields` in interface `JRDataset`
      Returns:
        the dataset's fields

    - #### getSortFields

          public JRSortField[] getSortFields()

      Description copied from interface: `JRDataset`
      Returns the dataset's sort fields.
      Specified by:
        `getSortFields` in interface `JRDataset`
      Returns:
        the dataset's sort fields

    - #### getVariables

          public JRVariable[] getVariables()

      Description copied from interface: `JRDataset`
      Returns the dataset's variables.
      Specified by:
        `getVariables` in interface `JRDataset`
      Returns:
        the dataset's variables

    - #### getGroups

          public JRGroup[] getGroups()

      Description copied from interface: `JRDataset`
      Returns the dataset's groups.
      Specified by:
        `getGroups` in interface `JRDataset`
      Returns:
        the dataset's groups

    - #### isMainDataset

          public boolean isMainDataset()

      Description copied from interface: `JRDataset`
      Decides whether this dataset is the main report dataset or a sub dataset.
      Specified by:
        `isMainDataset` in interface `JRDataset`
      Returns:
        `true` if and only if this dataset is the main report dataset

    - #### getResourceBundle

          public java.lang.String getResourceBundle()

      Description copied from interface: `JRDataset`
      Returns the resource bundle base name.

      The resource bundle is used when evaluating expressions.

      Specified by:
        `getResourceBundle` in interface `JRDataset`
      Returns:
        the resource bundle base name

    - #### getWhenResourceMissingTypeValue

          public WhenResourceMissingTypeEnum getWhenResourceMissingTypeValue()

      Description copied from interface: `JRDataset`
      Returns the resource missing handling type.
      Specified by:
        `getWhenResourceMissingTypeValue` in interface `JRDataset`
      Returns:
        the resource missing handling type

    - #### setWhenResourceMissingType

          public void setWhenResourceMissingType(WhenResourceMissingTypeEnum whenResourceMissingTypeValue)

      Description copied from interface: `JRDataset`
      Sets the resource missing handling type.
      Specified by:
        `setWhenResourceMissingType` in interface `JRDataset`
      Parameters:
        `whenResourceMissingTypeValue` - the resource missing handling type

    - #### hasProperties

          public boolean hasProperties()

      Description copied from interface: `JRPropertiesHolder`
      Checks whether the object has any properties.
      Specified by:
        `hasProperties` in interface `JRPropertiesHolder`
      Returns:
        whether the object has any properties

    - #### getPropertiesMap

          public JRPropertiesMap getPropertiesMap()

      Description copied from interface: `JRPropertiesHolder`
      Returns this object's properties map.
      Specified by:
        `getPropertiesMap` in interface `JRPropertiesHolder`
      Returns:
        this object's properties map

    - #### getParentProperties

          public JRPropertiesHolder getParentProperties()

      Description copied from interface: `JRPropertiesHolder`
      Returns the parent properties holder, whose properties are used as defaults for this object.
      Specified by:
        `getParentProperties` in interface `JRPropertiesHolder`
      Returns:
        the parent properties holder, or `null` if no parent

    - #### getFilterExpression

          public JRExpression getFilterExpression()

      Description copied from interface: `JRDataset`
      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.

      Specified by:
        `getFilterExpression` in interface `JRDataset`
      Returns:
        the dataset filter expression

    - #### clone

          public java.lang.Object clone()

      Specified by:
        `clone` in interface `JRCloneable`
      Overrides:
        `clone` in class `java.lang.Object`

    - #### getEventSupport

          public JRPropertyChangeSupport getEventSupport()

      Description copied from interface: `JRChangeEventsSupport`
      Returns the property change support object for this instance.
      Specified by:
        `getEventSupport` in interface `JRChangeEventsSupport`
      Returns:
        the property change support object for this instance

© 2001-2010 Jaspersoft Corporation www.jaspersoft.com