Class 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 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
    • Constructor Detail

      • PlSqlQueryExecuterFactory

        public PlSqlQueryExecuterFactory()
    • 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 interface QueryExecuterFactory
        Overrides:
        getBuiltinParameters in class JRJdbcQueryExecuterFactory
        Returns:
        array of built-in parameter names and types associated with this query type