public interface DataFactory
extends java.io.Serializable
Modifier and Type | Method and Description |
---|---|
void |
fetchData(Engine engine,
FetchTables fetchTables,
DataCollector collector)
Fetches the part of the report data for which this data factory is responsible.
|
java.util.List<ColumnInfo> |
getColumns(TableSource ts)
Returns the column information for a TableSource
|
com.inet.report.DatabaseConfiguration |
getConfiguration()
Returns the DatabaseConfiguration of this DataFactory.
|
boolean |
getReportDataPerInstance()
Override this method only if you use subreport(s) and you set the
data for the report with the getReportData or
fetchData(Engine, FetchTables, DataCollector) method. |
TableData |
getTableSourceData(TableSource ts)
Is called from getReportData to request the data of a single TableSource if the TableSource is not a joined table or view.
|
java.util.Map<java.lang.String,TableSourceInfo> |
getTableSourceInfos(Datasource ds,
java.lang.String catalog)
Returns a map of objects in the database which can return table data.
|
void |
setConfiguration(com.inet.report.DatabaseConfiguration configuration)
Sets the DatabaseConfiguration for this DataFactory. this is calling from the runtime after creating.
|
boolean getReportDataPerInstance()
fetchData(Engine, FetchTables, DataCollector)
method.
For more information please refer to the sample Main_and_Subreport_Data_WithExternalResultSet.java.@Nonnull TableData getTableSourceData(@Nonnull TableSource ts) throws ReportException
ts
- The current table sourceReportException
- if error occurs in the API access@Nonnull java.util.Map<java.lang.String,TableSourceInfo> getTableSourceInfos(@Nonnull Datasource ds, java.lang.String catalog) throws ReportException
TableSourceInfo
.ds
- datasource which describes the datacatalog
- an optional catalogReportException
- if any error occurs@Nonnull java.util.List<ColumnInfo> getColumns(@Nonnull TableSource ts) throws ReportException
ts
- the table source to get the data forReportException
- if any error occursvoid setConfiguration(@Nonnull com.inet.report.DatabaseConfiguration configuration)
configuration
- the current configurationcom.inet.report.DatabaseConfiguration getConfiguration()
void fetchData(@Nonnull Engine engine, @Nonnull FetchTables fetchTables, @Nonnull DataCollector collector) throws ReportException
FetchTables
instance. The resulting fetched
data is put to the specified DataCollector
during execution of this method.
An example implementation for this method:
for( TableSource tableSource : fetchDef.getTableSources() ) {
TableData tableData;
// retrieve data for table source "tableSource"
tableData = [...]
// deliver the data to the collector:
collector.addUnjoinedData( tableSource, tableData );
}
engine
- the engine of the report to renderfetchTables
- a model of joining table describing the data this data factory needs to delivercollector
- the collector which receives any resulting dataReportException
- on failures during data fetchingCopyright © 1999-2020 by i-net software GmbH