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:
QueryExecuterFactory
,Designated
public class PlSqlQueryExecuterFactory extends JRJdbcQueryExecuterFactory
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
Fields Modifier and Type Field Description static String
PARAMETER_ORACLE_REF_CURSOR
Built-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_SQL
-
Fields inherited from interface net.sf.jasperreports.engine.query.QueryExecuterFactory
QUERY_EXECUTER_FACTORY_PREFIX
-
-
Constructor Summary
Constructors Constructor Description PlSqlQueryExecuterFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.-
Methods inherited from class net.sf.jasperreports.engine.query.JRJdbcQueryExecuterFactory
createQueryExecuter, getDesignation
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.sf.jasperreports.engine.query.QueryExecuterFactory
createQueryExecuter
-
-
-
-
Field Detail
-
PARAMETER_ORACLE_REF_CURSOR
public static final String PARAMETER_ORACLE_REF_CURSOR
Built-in parameter holding the Oracle RefCursor needed to return values from a stored procedure.- See Also:
- Constant Field Values
-
-
Method Detail
-
getBuiltinParameters
public 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"}
).- Specified by:
getBuiltinParameters
in interfaceQueryExecuterFactory
- Overrides:
getBuiltinParameters
in classJRJdbcQueryExecuterFactory
- Returns:
- array of built-in parameter names and types associated with this query type
-
supportsQueryParameterType
public boolean supportsQueryParameterType(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.- Specified by:
supportsQueryParameterType
in interfaceQueryExecuterFactory
- Overrides:
supportsQueryParameterType
in classJRJdbcQueryExecuterFactory
- Parameters:
className
- the value class name of the parameter- Returns:
- whether the parameter value type is supported
-
-