Class PlSqlQueryExecuterFactory
java.lang.Object
net.sf.jasperreports.engine.query.AbstractQueryExecuterFactory
net.sf.jasperreports.engine.query.JRJdbcQueryExecuterFactory
net.sf.jasperreports.engine.query.PlSqlQueryExecuterFactory
- All Implemented Interfaces:
JRQueryExecuterFactory,QueryExecuterFactory,Designated
Query executer factory for Oracle queries, both inline SQL and stored
procedures.
The normal JRJdbcQueryExecuterFactory can be used with Oracle for inline SQL,
but not stored procedures.
To use with an oracle stored procedure that returns results via a REF CURSOR
you declare a parameter of type java.sql.ResultSet, and pass that to the
stored procedure. For example, if you have a stored procedure named "do_stuff"
that takes a string as the first parameter and returns results via the
second parameter you would use a query that looks like:
{call do_stuff($P{the_string_param}, $P{the_result_set_param})}
This factory creates Oracle query executers for SQL queries.- Author:
- Barry Klawans (bklawans@users.sourceforge.net) based off of work by Lucian Chirita (lucianc@users.sourceforge.net) in JRJdbcQueryExecuterFactory.java
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringBuilt-in parameter holding the Oracle RefCursor needed to return values from a stored procedure.Fields inherited from class net.sf.jasperreports.engine.query.JRJdbcQueryExecuterFactory
PROPERTY_CACHED_ROWSET, PROPERTY_FIELDS_TIME_ZONE, PROPERTY_JDBC_CONCURRENCY, PROPERTY_JDBC_FETCH_SIZE, PROPERTY_JDBC_HOLDABILITY, PROPERTY_JDBC_MAX_FIELD_SIZE, PROPERTY_JDBC_QUERY_TIMEOUT, PROPERTY_JDBC_RESULT_SET_TYPE, PROPERTY_PARAMETERS_TIME_ZONE, PROPERTY_TIME_ZONE, QUERY_EXECUTER_NAME, QUERY_LANGUAGE_SQLFields inherited from interface net.sf.jasperreports.engine.query.QueryExecuterFactory
QUERY_EXECUTER_FACTORY_PREFIX -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionObject[]Returns the built-in parameters associated with this query type.booleansupportsQueryParameterType(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.JRJdbcQueryExecuterFactory
createQueryExecuter, getDesignationMethods inherited from class net.sf.jasperreports.engine.query.AbstractQueryExecuterFactory
createQueryExecuterMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.sf.jasperreports.engine.query.QueryExecuterFactory
createQueryExecuter
-
Field Details
-
PARAMETER_ORACLE_REF_CURSOR
Built-in parameter holding the Oracle RefCursor needed to return values from a stored procedure.- See Also:
-
-
Constructor Details
-
PlSqlQueryExecuterFactory
public PlSqlQueryExecuterFactory()
-
-
Method Details
-
getBuiltinParameters
Description copied from interface:QueryExecuterFactoryReturns 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"}).- Specified by:
getBuiltinParametersin interfaceJRQueryExecuterFactory- Specified by:
getBuiltinParametersin interfaceQueryExecuterFactory- Overrides:
getBuiltinParametersin classJRJdbcQueryExecuterFactory- Returns:
- array of built-in parameter names and types associated with this query type
-
supportsQueryParameterType
Description copied from interface:QueryExecuterFactoryDecides whether the query executers created by this factory support a query parameter type. This check is performed for all $P{..} parameters in the query.- Specified by:
supportsQueryParameterTypein interfaceJRQueryExecuterFactory- Specified by:
supportsQueryParameterTypein interfaceQueryExecuterFactory- Overrides:
supportsQueryParameterTypein classJRJdbcQueryExecuterFactory- Parameters:
className- the value class name of the parameter- Returns:
- whether the parameter value type is supported
-