## org.jfree.report.modules.data.sql
Class SimpleSQLReportDataFactory

    java.lang.Object
      org.jfree.report.modules.data.sql.SimpleSQLReportDataFactory

All Implemented Interfaces:
  java.lang.Cloneable, ReportDataFactory

Direct Known Subclasses:
  SQLReportDataFactory

    public class SimpleSQLReportDataFactory

extends java.lang.Object
implements ReportDataFactory, java.lang.Cloneable

Creation-Date: 19.02.2006, 17:37:33

Author:
  Thomas Morgner

Constructor Summary
`SimpleSQLReportDataFactory(java.sql.Connection connection)`
`SimpleSQLReportDataFactory(ConnectionProvider connectionProvider)`

Method Summary
`java.lang.Object` `clone()`
`void` `close()` Closes the report data factory and all report data instances that have been returned by this instance.
`ReportDataFactory` `derive()` Derives a freshly initialized report data factory, which is independend of the original data factory.
`boolean` `isLabelMapping()`
`void` `open()`
`ReportData` `queryData(java.lang.String query, DataSet parameters)` Queries a datasource.
`void` `setLabelMapping(boolean labelMapping)`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SimpleSQLReportDataFactory

    public SimpleSQLReportDataFactory(java.sql.Connection connection)

### SimpleSQLReportDataFactory

    public SimpleSQLReportDataFactory(ConnectionProvider connectionProvider)

Method Detail

### isLabelMapping

    public boolean isLabelMapping()

### setLabelMapping

    public void setLabelMapping(boolean labelMapping)

### queryData

    public ReportData queryData(java.lang.String query,
                                DataSet parameters)
                         throws ReportDataFactoryException

  Queries a datasource. The string 'query' defines the name of the query. The Parameterset given here may contain more data than actually needed.

  The dataset may change between two calls, do not assume anything!

  Specified by:
    `queryData` in interface `ReportDataFactory`
  Parameters:
    `query` -
    `parameters` -
  Returns:
  Throws:
    `ReportDataFactoryException`

### open

    public void open()

  Specified by:
    `open` in interface `ReportDataFactory`

### close

    public void close()

  Description copied from interface: `ReportDataFactory`
  Closes the report data factory and all report data instances that have been returned by this instance.

  Specified by:
    `close` in interface `ReportDataFactory`

### derive

    public ReportDataFactory derive()

  Derives a freshly initialized report data factory, which is independend of the original data factory. Opening or Closing one data factory must not affect the other factories.

  Specified by:
    `derive` in interface `ReportDataFactory`
  Returns:

### clone

    public java.lang.Object clone()
                           throws java.lang.CloneNotSupportedException

  Overrides:
    `clone` in class `java.lang.Object`
  Throws:
    `java.lang.CloneNotSupportedException`