Jump to: navigation, search

Difference between revisions of "EclipseLink/Examples/JPA/nonJDBCArgsToStoredProcedures"

(How to handle nonJDBC arguments for Oracle Stored Procedures)
(How to handle nonJDBC arguments for Oracle Stored Procedures)
Line 7: Line 7:
  
 
For a target procedure:
 
For a target procedure:
<code><pre>
+
<pre style='color:#000000;background:#ffffff;'><span style='color:#575757; font-weight:bold; '>procedure</span> bool_test<span style='color:#555555; '>(</span>x <span style='color:#575757; font-weight:bold; '>IN</span> <span style='color:#575757; font-weight:bold; '>BOOLEAN</span><span style='color:#555555; '>)</span>
procedure bool_test(x IN BOOLEAN)
+
</pre>
</pre></code>
+
  
 
x
 
x

Revision as of 11:30, 23 November 2007

{available as of EclipseLink 1.0M2}

How to handle nonJDBC arguments for Oracle Stored Procedures

The standard way of handling a Stored Procedure is to build an instance of oracle.toplink.queryframework.StoredProcedureCall. However, the arguments must be compatible with the JDBC specification.

To handle nonJDBC arguments (e.g. BOOLEAN, PLS_INTEGER, PL/SQL record, etc.) a new sub-class has been created: oracle.toplink.platform.database.oracle.PLSQLStoredProcedureCall:

For a target procedure:

<span style='color:#575757; font-weight:bold; '>procedure</span> bool_test<span style='color:#555555; '>(</span>x <span style='color:#575757; font-weight:bold; '>IN</span> <span style='color:#575757; font-weight:bold; '>BOOLEAN</span><span style='color:#555555; '>)</span>

x