net.sf.jasperreports.engine.query

## Class JRXlsxQueryExecuterFactory

- java.lang.Object
- - net.sf.jasperreports.engine.query.AbstractQueryExecuterFactory
  - - net.sf.jasperreports.engine.query.AbstractXlsQueryExecuterFactory
    - - net.sf.jasperreports.engine.query.JRXlsxQueryExecuterFactory

- All Implemented Interfaces:
    JRQueryExecuterFactory, QueryExecuterFactory

      public class JRXlsxQueryExecuterFactory
      extends AbstractXlsQueryExecuterFactory

  Query executer factory for XLSX file type.

  The factory creates `JRXlsxQueryExecuter` query executers.
  Version:
    $Id: JRXlsxQueryExecuterFactory.java 6986 2014-03-26 09:50:48Z teodord $
  Author:
    sanda zaharia (shertage@users.sourceforge.net)

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `XLSX_COLUMN_INDEXES` Deprecated. Replaced by `AbstractXlsQueryExecuterFactory.XLS_COLUMN_INDEXES`.
    `static java.lang.String` | `XLSX_COLUMN_INDEXES_ARRAY` Deprecated. Replaced by `AbstractXlsQueryExecuterFactory.XLS_COLUMN_INDEXES_ARRAY`.
    `static java.lang.String` | `XLSX_COLUMN_NAMES` Deprecated. Replaced by `AbstractXlsQueryExecuterFactory.XLS_COLUMN_NAMES`.
    `static java.lang.String` | `XLSX_COLUMN_NAMES_ARRAY` Deprecated. Replaced by `AbstractXlsQueryExecuterFactory.XLS_COLUMN_NAMES_ARRAY`.
    `static java.lang.String` | `XLSX_DATE_FORMAT` Deprecated. Replaced by `AbstractXlsQueryExecuterFactory.XLS_DATE_FORMAT`.
    `static java.lang.String` | `XLSX_DATE_PATTERN` Deprecated. Replaced by `AbstractXlsQueryExecuterFactory.XLS_DATE_PATTERN`.
    `static java.lang.String` | `XLSX_FILE` Deprecated. Replaced by `AbstractXlsQueryExecuterFactory.XLS_FILE`.
    `static java.lang.String` | `XLSX_INPUT_STREAM` Deprecated. Replaced by `AbstractXlsQueryExecuterFactory.XLS_INPUT_STREAM`.
    `static java.lang.String` | `XLSX_LOCALE` Deprecated. Replaced by `AbstractXlsQueryExecuterFactory.XLS_LOCALE`.
    `static java.lang.String` | `XLSX_LOCALE_CODE` Deprecated. Replaced by `AbstractXlsQueryExecuterFactory.XLS_LOCALE_CODE`.
    `static java.lang.String` | `XLSX_NUMBER_FORMAT` Deprecated. Replaced by `AbstractXlsQueryExecuterFactory.XLS_NUMBER_FORMAT`.
    `static java.lang.String` | `XLSX_NUMBER_PATTERN` Deprecated. Replaced by `AbstractXlsQueryExecuterFactory.XLS_NUMBER_PATTERN`.
    `static java.lang.String` | `XLSX_SOURCE` Deprecated. Replaced by `AbstractXlsQueryExecuterFactory.XLS_SOURCE`.
    `static java.lang.String` | `XLSX_TIMEZONE` Deprecated. Replaced by `AbstractXlsQueryExecuterFactory.XLS_TIMEZONE`.
    `static java.lang.String` | `XLSX_TIMEZONE_ID` Deprecated. Replaced by `AbstractXlsQueryExecuterFactory.XLS_TIMEZONE_ID`.
    `static java.lang.String` | `XLSX_USE_FIRST_ROW_AS_HEADER` Deprecated. Replaced by `AbstractXlsQueryExecuterFactory.XLS_USE_FIRST_ROW_AS_HEADER`.
    `static java.lang.String` | `XLSX_WORKBOOK` Deprecated. Replaced by `AbstractXlsQueryExecuterFactory.XLS_WORKBOOK`.

    - ### Fields inherited from class net.sf.jasperreports.engine.query.AbstractXlsQueryExecuterFactory

      `XLS_COLUMN_INDEXES, XLS_COLUMN_INDEXES_ARRAY, XLS_COLUMN_NAMES, XLS_COLUMN_NAMES_ARRAY, XLS_DATE_FORMAT, XLS_DATE_PATTERN, XLS_FILE, XLS_INPUT_STREAM, XLS_LOCALE, XLS_LOCALE_CODE, XLS_NUMBER_FORMAT, XLS_NUMBER_PATTERN, XLS_SHEET_SELECTION, XLS_SOURCE, XLS_TIMEZONE, XLS_TIMEZONE_ID, XLS_USE_FIRST_ROW_AS_HEADER, XLS_WORKBOOK`

    - ### Fields inherited from interface net.sf.jasperreports.engine.query.QueryExecuterFactory

      `QUERY_EXECUTER_FACTORY_PREFIX`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `JRXlsxQueryExecuterFactory()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `JRQueryExecuter` | `createQueryExecuter(JasperReportsContext jasperReportsContext, JRDataset dataset, java.util.Map<java.lang.String,? extends JRValueParameter> parameters)` Creates a query executer.
    `java.lang.Object[]` | `getBuiltinParameters()` Returns the built-in parameters associated with this query type.
    `boolean` | `supportsQueryParameterType(java.lang.String className)` Decides whether the query executers created by this factory support a query parameter type.

    - ### Methods inherited from class net.sf.jasperreports.engine.query.AbstractQueryExecuterFactory

      `createQueryExecuter`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### XLSX_WORKBOOK

          public static final java.lang.String XLSX_WORKBOOK

      Deprecated. Replaced by `AbstractXlsQueryExecuterFactory.XLS_WORKBOOK`.
      Built-in parameter holding the value of the `org.apache.poi.ss.usermodel.Workbook` to be used for obtaining the XLSX data.
      See Also:
        Constant Field Values

    - #### XLSX_INPUT_STREAM

          public static final java.lang.String XLSX_INPUT_STREAM

      Deprecated. Replaced by `AbstractXlsQueryExecuterFactory.XLS_INPUT_STREAM`.
      Built-in parameter holding the value of the `java.io.InputStream` to be used for obtaining the XLSX data.
      See Also:
        Constant Field Values

    - #### XLSX_FILE

          public static final java.lang.String XLSX_FILE

      Deprecated. Replaced by `AbstractXlsQueryExecuterFactory.XLS_FILE`.
      Built-in parameter holding the value of the `java.io.File` to be used for obtaining the XLSX data.
      See Also:
        Constant Field Values

    - #### XLSX_SOURCE

          public static final java.lang.String XLSX_SOURCE

      Deprecated. Replaced by `AbstractXlsQueryExecuterFactory.XLS_SOURCE`.
      Built-in parameter holding the value of the `java.lang.String` source to be used for obtaining the XLSX data.
      See Also:
        Constant Field Values

    - #### XLSX_COLUMN_NAMES

          public static final java.lang.String XLSX_COLUMN_NAMES

      Deprecated. Replaced by `AbstractXlsQueryExecuterFactory.XLS_COLUMN_NAMES`.
      Built-in parameter/property holding the value of the columns to be extracted from the XLSX source. When used as report parameter, the value has to be a `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 XLSX columns in the format: `net.sf.jasperreports.xlsx.column.names.{arbitrary_name}=value1[, value2, ...]`
      See Also:
        Constant Field Values

    - #### XLSX_COLUMN_INDEXES

          public static final java.lang.String XLSX_COLUMN_INDEXES

      Deprecated. Replaced by `AbstractXlsQueryExecuterFactory.XLS_COLUMN_INDEXES`.
      Built-in parameter/property holding the value of the column indexs to be extracted from the XLSX source. When used as report parameter, the value has to be a `java.lang.String` object containing column indexes separated by comma. It can also be used as the prefix for custom dataset properties specifying the names of the XLSX column indexes in the format: `net.sf.jasperreports.xls.column.indexes.{arbitrary_name}=value1[, value2, ...]`
      See Also:
        Constant Field Values

    - #### XLSX_COLUMN_NAMES_ARRAY

          public static final java.lang.String XLSX_COLUMN_NAMES_ARRAY

      Deprecated. Replaced by `AbstractXlsQueryExecuterFactory.XLS_COLUMN_NAMES_ARRAY`.
      Built-in parameter holding the value of the columns to be extracted from the XLSX source, as a `java.lang.String[]` object.

      When this parameter is null or missing, its value defaults to the values provided by properties prefixed with `XLSX_COLUMN_NAMES`.
      See Also:
        Constant Field Values

    - #### XLSX_COLUMN_INDEXES_ARRAY

          public static final java.lang.String XLSX_COLUMN_INDEXES_ARRAY

      Deprecated. Replaced by `AbstractXlsQueryExecuterFactory.XLS_COLUMN_INDEXES_ARRAY`.
      Built-in parameter holding the value of the column indexes to be extracted from the XLSX source, as a `java.lang.Integer[]` object.

      When this parameter is null or missing, its value defaults to the values provided by properties prefixed with `XLSX_COLUMN_INDEXES`.
      See Also:
        Constant Field Values

    - #### XLSX_LOCALE

          public static final java.lang.String XLSX_LOCALE

      Deprecated. Replaced by `AbstractXlsQueryExecuterFactory.XLS_LOCALE`.
      Built-in parameter holding the `java.util.Locale` value of the locale to be used when parsing the XLSX data.
      See Also:
        Constant Field Values

    - #### XLSX_LOCALE_CODE

          public static final java.lang.String XLSX_LOCALE_CODE

      Deprecated. Replaced by `AbstractXlsQueryExecuterFactory.XLS_LOCALE_CODE`.
      Built-in parameter/property holding the `java.lang.String` code of the locale to be used when parsing the XLSX data.

      The allowed format is: language[_country[_variant]]
      See Also:
        Constant Field Values

    - #### XLSX_TIMEZONE

          public static final java.lang.String XLSX_TIMEZONE

      Deprecated. Replaced by `AbstractXlsQueryExecuterFactory.XLS_TIMEZONE`.
      Built-in parameter holding the `java.util.TimeZone` value of the timezone to be used when parsing the XLSX data.
      See Also:
        Constant Field Values

    - #### XLSX_TIMEZONE_ID

          public static final java.lang.String XLSX_TIMEZONE_ID

      Deprecated. Replaced by `AbstractXlsQueryExecuterFactory.XLS_TIMEZONE_ID`.
      Built-in parameter/property holding the `java.lang.String` value of the time zone id to be used when parsing the XLSX data.
      See Also:
        Constant Field Values

    - #### XLSX_DATE_FORMAT

          public static final java.lang.String XLSX_DATE_FORMAT

      Deprecated. Replaced by `AbstractXlsQueryExecuterFactory.XLS_DATE_FORMAT`.
      Built-in parameter holding the value of the `java.text.DateFormat` used to format date columns from the XLSX source.
      See Also:
        Constant Field Values

    - #### XLSX_DATE_PATTERN

          public static final java.lang.String XLSX_DATE_PATTERN

      Deprecated. Replaced by `AbstractXlsQueryExecuterFactory.XLS_DATE_PATTERN`.
      Built-in parameter/property holding the value of the date format pattern to be used when parsing the XLSX data.
      See Also:
        Constant Field Values

    - #### XLSX_NUMBER_FORMAT

          public static final java.lang.String XLSX_NUMBER_FORMAT

      Deprecated. Replaced by `AbstractXlsQueryExecuterFactory.XLS_NUMBER_FORMAT`.
      Built-in parameter holding the value of the `java.text.NumberFormat` used to format numeric columns from the XLSX source.
      See Also:
        Constant Field Values

    - #### XLSX_NUMBER_PATTERN

          public static final java.lang.String XLSX_NUMBER_PATTERN

      Deprecated. Replaced by `AbstractXlsQueryExecuterFactory.XLS_NUMBER_PATTERN`.
      Built-in parameter/property holding the value of the number format pattern to be used when parsing the XLSX data.
      See Also:
        Constant Field Values

    - #### XLSX_USE_FIRST_ROW_AS_HEADER

          public static final java.lang.String XLSX_USE_FIRST_ROW_AS_HEADER

      Deprecated. Replaced by `AbstractXlsQueryExecuterFactory.XLS_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 XLSX source. As parameter, it should hold a `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 `XLSX_COLUMN_NAMES` or `XLSX_COLUMN_NAMES_ARRAY` would have no effect.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### JRXlsxQueryExecuterFactory

          public JRXlsxQueryExecuterFactory()

  - ### Method Detail

    - #### getBuiltinParameters

          public java.lang.Object[] getBuiltinParameters()

      Description copied from interface: `QueryExecuterFactory`
      Returns the built-in parameters associated with this query type.

      These parameters will be created as system-defined parameters for each report/dataset having a query of this type.

      The returned array should contain consecutive pairs of parameter names and parameter classes (e.g. `{"Param1", String.class, "Param2", "List.class"}`).
      Returns:
        array of built-in parameter names and types associated with this query type

    - #### createQueryExecuter

          public JRQueryExecuter createQueryExecuter(JasperReportsContext jasperReportsContext,
                                            JRDataset dataset,
                                            java.util.Map<java.lang.String,? extends JRValueParameter> parameters)
                                              throws JRException

      Description copied from interface: `QueryExecuterFactory`
      Creates a query executer.

      This method is called at fill time for reports/datasets having a query supported by this factory.
      Parameters:
        `jasperReportsContext` - the JasperReportsContext
        `dataset` - the dataset containing the query, fields, etc
        `parameters` - map of value parameters (instances of `JRValueParameter`) indexed by name
      Returns:
        a query executer
      Throws:
        `JRException`

    - #### supportsQueryParameterType

          public boolean supportsQueryParameterType(java.lang.String className)

      Description copied from interface: `QueryExecuterFactory`
      Decides whether the query executers created by this factory support a query parameter type.

      This check is performed for all $P{..} parameters in the query.
      Parameters:
        `className` - the value class name of the parameter
      Returns:
        whether the parameter value type is supported

© 2001-2010 Jaspersoft Corporation www.jaspersoft.com