Package net.sf.jasperreports.poi.query
Class ExcelQueryExecuter
- java.lang.Object
-
- net.sf.jasperreports.engine.query.JRAbstractQueryExecuter
-
- net.sf.jasperreports.engine.query.AbstractXlsQueryExecuter
-
- net.sf.jasperreports.poi.query.ExcelQueryExecuter
-
- All Implemented Interfaces:
JRQueryExecuter
public class ExcelQueryExecuter extends AbstractXlsQueryExecuter
Excel query executer implementation.- Author:
- Sanda Zaharia (shertage@users.sourceforge.net)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.sf.jasperreports.engine.query.JRAbstractQueryExecuter
JRAbstractQueryExecuter.QueryParameter, JRAbstractQueryExecuter.QueryParameterEntry, JRAbstractQueryExecuter.QueryParameterVisitor, JRAbstractQueryExecuter.ValuedQueryParameter, JRAbstractQueryExecuter.VisitExceptionWrapper
-
-
Field Summary
Fields Modifier and Type Field Description static String
EXCEL_DATA_SOURCE_CLASS
static String
FASTEXCEL_DATA_SOURCE_CLASS
static String
PROPERTY_XLSX_DATA_SOURCE_FACTORY
A property that specifies the name of class implementing the Excel data source factory interface to be used for reading XLSX format files.-
Fields inherited from class net.sf.jasperreports.engine.query.JRAbstractQueryExecuter
clauseFunctions, dataset, EXCEPTION_MESSAGE_KEY_NUMERIC_TYPE_REQUIRED, EXCEPTION_MESSAGE_KEY_PARAMETER_NOT_FOUND, EXCEPTION_MESSAGE_KEY_QUERY_CLAUSE_CIRCULARLY_NESTED_PARAMETER, EXCEPTION_MESSAGE_KEY_QUERY_CLAUSE_ID_FIRST_TOKEN_MISSING, EXCEPTION_MESSAGE_KEY_QUERY_CLAUSE_NOT_FOUND, EXCEPTION_MESSAGE_KEY_UNSUPPORTED_PARAMETER_TYPE, GET_COLLECTED
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ExcelQueryExecuter(JasperReportsContext jasperReportsContext, JRDataset dataset, Map<String,? extends JRValueParameter> parametersMap)
protected
ExcelQueryExecuter(JRDataset dataset, Map<String,? extends JRValueParameter> parametersMap)
protected
ExcelQueryExecuter(QueryExecutionContext context, JRDataset dataset, Map<String,? extends JRValueParameter> parametersMap)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description JRDataSource
createDatasource()
Executes the query and creates aJRDataSource
out of the result.static AbstractXlsDataSource
createDataSource(String dataSourceFactoryClassName, InputStream inputStream, boolean closeInputStream)
static AbstractXlsDataSource
createDataSource(String dataSourceClassName, Class<?>[] constrParamTypes, Object[] constrParamValues)
static Pair<InputStream,ExcelFormatEnum>
sniffExcelFormat(InputStream inputStream)
-
Methods inherited from class net.sf.jasperreports.engine.query.AbstractXlsQueryExecuter
cancelQuery, close, getParameterReplacement, initDatasource
-
Methods inherited from class net.sf.jasperreports.engine.query.JRAbstractQueryExecuter
addQueryMultiParameters, addQueryMultiParameters, addQueryParameter, addQueryParameter, appendClauseChunk, appendParameterChunk, appendParameterClauseChunk, appendQueryChunk, appendTextChunk, applyClause, checkParameter, findExtensionQueryFunction, getBooleanParameter, getBooleanParameter, getBooleanParameterOrProperty, getBooleanParameterOrProperty, getCanonicalQueryLanguage, getCollectedParameterNames, getCollectedParameters, getIntegerParameter, getIntegerParameter, getIntegerParameterOrProperty, getIntegerParameterOrProperty, getJasperReportsContext, getParameterValue, getParameterValue, getPropertiesUtil, getQueryExecutionContext, getQueryString, getRepositoryContext, getStringParameter, getStringParameterOrProperty, getValueParameter, getValueParameter, parameterHasValue, parseQuery, registerClauseFunction, resolveFunction, unregisterClauseFunction, visitQueryParameters
-
-
-
-
Field Detail
-
PROPERTY_XLSX_DATA_SOURCE_FACTORY
public static final String PROPERTY_XLSX_DATA_SOURCE_FACTORY
A property that specifies the name of class implementing the Excel data source factory interface to be used for reading XLSX format files. See theXlsxDataSourceFactory
interface.- See Also:
- Constant Field Values
-
EXCEL_DATA_SOURCE_CLASS
public static final String EXCEL_DATA_SOURCE_CLASS
- See Also:
- Constant Field Values
-
FASTEXCEL_DATA_SOURCE_CLASS
public static final String FASTEXCEL_DATA_SOURCE_CLASS
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ExcelQueryExecuter
protected ExcelQueryExecuter(JasperReportsContext jasperReportsContext, JRDataset dataset, Map<String,? extends JRValueParameter> parametersMap)
-
ExcelQueryExecuter
protected ExcelQueryExecuter(QueryExecutionContext context, JRDataset dataset, Map<String,? extends JRValueParameter> parametersMap)
-
ExcelQueryExecuter
protected ExcelQueryExecuter(JRDataset dataset, Map<String,? extends JRValueParameter> parametersMap)
-
-
Method Detail
-
createDatasource
public JRDataSource createDatasource() throws JRException
Description copied from interface:JRQueryExecuter
Executes the query and creates aJRDataSource
out of the result.- Returns:
- a
JRDataSource
wrapping the query execution result. - Throws:
JRException
-
createDataSource
public static AbstractXlsDataSource createDataSource(String dataSourceClassName, Class<?>[] constrParamTypes, Object[] constrParamValues) throws JRException
- Throws:
JRException
-
createDataSource
public static AbstractXlsDataSource createDataSource(String dataSourceFactoryClassName, InputStream inputStream, boolean closeInputStream) throws JRException
- Throws:
JRException
-
sniffExcelFormat
public static Pair<InputStream,ExcelFormatEnum> sniffExcelFormat(InputStream inputStream)
-
-