public class JRCsvQueryExecuterFactory extends AbstractQueryExecuterFactory
JRCsvQueryExecuter
query executers.Modifier and Type | Field and Description |
---|---|
static String |
CSV_COLUMN_NAMES
Built-in parameter/property holding the value of the columns to be extracted from the CSV source.
|
static String |
CSV_COLUMN_NAMES_ARRAY
Built-in parameter holding the value of the columns to be extracted from the CSV source, as a
java.lang.String[] object. |
static String |
CSV_DATE_FORMAT
Built-in parameter holding the value of the
java.text.DateFormat used to format date columns from the CSV source. |
static String |
CSV_DATE_PATTERN
Built-in parameter/property holding the value of the date format pattern to be used when parsing the CSV data.
|
static String |
CSV_ENCODING
Built-in parameter/property holding the value of the charset used to encode the CSV stream.
|
static String |
CSV_FIELD_DELIMITER
Built-in parameter/property holding the value of the field delimiter from the CSV source.
|
static String |
CSV_FILE
Built-in parameter holding the value of the
java.io.File to be used for obtaining the CSV data. |
static String |
CSV_INPUT_STREAM
Built-in parameter holding the value of the
java.io.InputStream to be used for obtaining the CSV data. |
static String |
CSV_LOCALE
Built-in parameter holding the
java.util.Locale value of the locale to be used when parsing the CSV data. |
static String |
CSV_LOCALE_CODE
Built-in parameter/property holding the
java.lang.String code of the locale to be used when parsing the CSV data. |
static String |
CSV_NUMBER_FORMAT
Built-in parameter holding the value of the
java.text.NumberFormat used to format numeric columns from the CSV source. |
static String |
CSV_NUMBER_PATTERN
Built-in parameter/property holding the value of the number format pattern to be used when parsing the CSV data.
|
static String |
CSV_READER
Built-in parameter holding the value of the
java.io.Reader to be used for obtaining the CSV data. |
static String |
CSV_RECORD_DELIMITER
Build-in parameter/property holding the value of the record delimiter from the CSV source
|
static String |
CSV_SOURCE
Built-in parameter/property holding the value of the source for the CSV file.
|
static String |
CSV_TIMEZONE
Built-in parameter holding the
java.util.TimeZone value of the timezone to be used when parsing the CSV data. |
static String |
CSV_TIMEZONE_ID
Built-in parameter/property holding the
java.lang.String value of the time zone id to be used when parsing the CSV data. |
static String |
CSV_URL
Built-in parameter holding the value of the
java.net.URL to be used for obtaining the CSV data. |
static String |
CSV_USE_FIRST_ROW_AS_HEADER
Built-in parameter/property specifying whether or not the column names should be obtained
from the first row in the CSV source.
|
QUERY_EXECUTER_FACTORY_PREFIX
Constructor and Description |
---|
JRCsvQueryExecuterFactory() |
Modifier and Type | Method and Description |
---|---|
JRQueryExecuter |
createQueryExecuter(JasperReportsContext jasperReportsContext,
JRDataset dataset,
Map<String,? extends JRValueParameter> parameters)
Creates a query executer.
|
Object[] |
getBuiltinParameters()
Returns the built-in parameters associated with this query type.
|
boolean |
supportsQueryParameterType(String className)
Decides whether the query executers created by this factory support a query parameter type.
|
createQueryExecuter
public static final String CSV_SOURCE
public static final String CSV_INPUT_STREAM
java.io.InputStream
to be used for obtaining the CSV data.public static final String CSV_URL
java.net.URL
to be used for obtaining the CSV data.public static final String CSV_FILE
java.io.File
to be used for obtaining the CSV data.public static final String CSV_READER
java.io.Reader
to be used for obtaining the CSV data.public static final String CSV_ENCODING
CSV_INPUT_STREAM
, CSV_URL
or CSV_FILE
.public static final String CSV_COLUMN_NAMES
java.lang.String
object containing column names separated by commas.
It can also be used as the prefix for custom dataset properties specifying the names of the CSV columns in the format:
net.sf.jasperreports.csv.column.names.{arbitrary_name}=value1[, value2, ...]
public static final String CSV_COLUMN_NAMES_ARRAY
java.lang.String[]
object.
When this parameter is null or missing, its value defaults to the values provided
by properties prefixed with CSV_COLUMN_NAMES
.public static final String CSV_LOCALE
java.util.Locale
value of the locale to be used when parsing the CSV data.public static final String CSV_LOCALE_CODE
java.lang.String
code of the locale to be used when parsing the CSV data.
The allowed format is: language[_country[_variant]]public static final String CSV_TIMEZONE
java.util.TimeZone
value of the timezone to be used when parsing the CSV data.public static final String CSV_TIMEZONE_ID
java.lang.String
value of the time zone id to be used when parsing the CSV data.public static final String CSV_DATE_FORMAT
java.text.DateFormat
used to format date columns from the CSV source.public static final String CSV_DATE_PATTERN
public static final String CSV_FIELD_DELIMITER
public static final String CSV_NUMBER_FORMAT
java.text.NumberFormat
used to format numeric columns from the CSV source.public static final String CSV_NUMBER_PATTERN
public static final String CSV_RECORD_DELIMITER
public static final String CSV_USE_FIRST_ROW_AS_HEADER
java.lang.Boolean
value, while as custom dataset property, it should be true or false.
If this parameter is set to true, then setting the CSV_COLUMN_NAMES
or CSV_COLUMN_NAMES_ARRAY
would have no effect.public Object[] getBuiltinParameters()
QueryExecuterFactory
{"Param1", String.class, "Param2", "List.class"}
).public JRQueryExecuter createQueryExecuter(JasperReportsContext jasperReportsContext, JRDataset dataset, Map<String,? extends JRValueParameter> parameters) throws JRException
QueryExecuterFactory
jasperReportsContext
- the JasperReportsContextdataset
- the dataset containing the query, fields, etcparameters
- map of value parameters (instances of JRValueParameter
)
indexed by nameJRException
public boolean supportsQueryParameterType(String className)
QueryExecuterFactory
className
- the value class name of the parameterCopyright © 2015. All rights reserved.