public abstract class SQLValueProvider extends java.lang.Object implements DynamicValueProvider
Connection.createStatement()
and
Statement.executeQuery(String)
, which means that the SQL query can be any standard
SQL statement. SPs also work for most databases, but not for Oracle or PostgreSQL.Datasource
,
Statement.execute(String)
,
Serialized FormModifier and Type | Field and Description |
---|---|
static int |
MAX_RECORDS
The maximum number of records that will be fetched before the rest are ignored and the prompt becomes editable.
|
Modifier and Type | Method and Description |
---|---|
abstract Datasource |
getDatasource()
Returns the data source the query is to be run on
|
DefaultValue[] |
getDefaultValues()
Returns an array of DefaultValue objects for a prompt field.
|
abstract java.lang.String |
getSQL()
Returns the query which is to be used for fetching the values and optionally descriptions dynamically.
|
isDOMParser, parseDOM, parseElement, parseEndElement, parseText
public static final int MAX_RECORDS
public DefaultValue[] getDefaultValues()
getDefaultValues
in interface DynamicValueProvider
java.lang.IllegalStateException
- if the query returns a value or a description longer than 50000 characters.public abstract java.lang.String getSQL() throws ReportException, java.sql.SQLException
ReportException
- if the database structure does allow a single joined queryjava.sql.SQLException
- on SQL errors during requesting metadatapublic abstract Datasource getDatasource()
Copyright © 1999-2018 by i-net software GmbH