public abstract class JdbcData extends BaseDataFactory
Constructor and Description |
---|
JdbcData() |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
getColumnName(java.lang.String colName,
java.lang.String alias,
int driverVersion,
TableSource ts,
int colIdx)
Returns the column name dependent of the database.
|
java.util.List<ColumnInfo> |
getColumns(TableSource ts)
Returns the column information for a TableSource
|
protected abstract java.sql.ResultSet |
getProcedureColumns(Datasource ds,
java.lang.String catalog,
java.lang.String schema,
java.lang.String procedure)
Is used from
#getColumns(TableSource) if the TableSource based on a stored procedure. |
protected abstract java.sql.ResultSet |
getProcedures(Datasource ds,
java.lang.String catalog)
Is used from
#getTableSourceInfos(Datasource, String) to find a list of stored procedures. |
boolean |
getReportDataPerInstance()
Override this method only if you use subreport(s) and you set the
data for the report with the getReportData or
DataFactory.fetchData(Engine, FetchTables, DataCollector) method. |
protected abstract java.lang.String |
getSourceNameWithChange(TableSource ts,
boolean escapeEverything)
Returns the source name like catalog.schema.table.
|
abstract com.inet.report.database.sql.SqlSyntax |
getSqlSyntax()
Returns the SQL syntax definition instance for this data factory.
|
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.
|
protected abstract java.sql.ResultSet |
getTables(Datasource ds,
java.lang.String catalog)
Is used from
#getTableSourceInfos(Datasource, String) to find a list of tables and views. |
fetchData, getColumns, getConfiguration, getTableSourceData, getTableSourceData, setConfiguration
@Nonnull public TableData getTableSourceData(TableSource ts) throws ReportException
getTableSourceData
in interface DataFactory
getTableSourceData
in class BaseDataFactory
ts
- The current table sourceReportException
- if error occurs in the API accesspublic boolean getReportDataPerInstance()
DataFactory.fetchData(Engine, FetchTables, DataCollector)
method.
For more information please refer to the sample Main_and_Subreport_Data_WithExternalResultSet.java.getReportDataPerInstance
in interface DataFactory
getReportDataPerInstance
in class BaseDataFactory
@Nonnull public java.util.Map<java.lang.String,TableSourceInfo> getTableSourceInfos(Datasource ds, java.lang.String catalog) throws ReportException
TableSourceInfo
.ds
- datasource which describes the datacatalog
- an optional catalogReportException
- if any error occurspublic java.util.List<ColumnInfo> getColumns(TableSource ts) throws ReportException
getColumns
in interface DataFactory
getColumns
in class BaseDataFactory
ts
- the table source to get the data forReportException
- if any error occursprotected abstract java.sql.ResultSet getTables(Datasource ds, java.lang.String catalog) throws java.sql.SQLException, ReportException
#getTableSourceInfos(Datasource, String)
to find a list of tables and views.ds
- The current Datasource containing the Connection.catalog
- The catalog/database set in login dialog of i-net Designer.java.sql.SQLException
- if a database access error occursReportException
- if the creation of a Connection failed.protected abstract java.sql.ResultSet getProcedures(Datasource ds, java.lang.String catalog) throws java.sql.SQLException, ReportException
#getTableSourceInfos(Datasource, String)
to find a list of stored procedures.
Returns the procedures meta data for a datasource and catalog as defined by
DatabaseMetaData.getProcedures(String, String, String)
ds
- the datasource to connect to (if not already connected)catalog
- a catalog name; must match the catalog name as it is stored
in the database; "" retrieves those without a catalog; null means that the
catalog name should not be used to narrow the searchjava.sql.SQLException
- if a database access error occursReportException
- if creating a Connection failed.protected abstract java.sql.ResultSet getProcedureColumns(Datasource ds, java.lang.String catalog, java.lang.String schema, java.lang.String procedure) throws java.sql.SQLException, ReportException
#getColumns(TableSource)
if the TableSource based on a stored procedure.ds
- The Datasource containing the Connection.catalog
- The catalog/database set in login dialog of i-net Designer.schema
- The table owner or null.procedure
- The procedure name.java.sql.SQLException
- This SQLException will be show in a message box in i-net Designer.ReportException
- if the creation of a Connection failed.protected java.lang.String getColumnName(java.lang.String colName, java.lang.String alias, int driverVersion, TableSource ts, int colIdx)
colName
- the column namealias
- the column alias (required for MySQL Connector5.x only)driverVersion
- the driver version (required for MySQL Connector5.x only)ts
- the table sourcecolIdx
- the column index (required for Informix only)protected abstract java.lang.String getSourceNameWithChange(TableSource ts, boolean escapeEverything)
ts
- the table sourceescapeEverything
- True if the complete sql identifier should be quoted false otherwisepublic abstract com.inet.report.database.sql.SqlSyntax getSqlSyntax()
Copyright © 1999-2020 by i-net software GmbH