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

From Eclipsepedia

Jump to: navigation, search
(How to handle nonJDBC arguments for Oracle Stored Procedures)
(How to handle nonJDBC arguments for Oracle Stored Procedures)
Line 6: Line 6:
 
To handle nonJDBC arguments (e.g. BOOLEAN, PLS_INTEGER, PL/SQL record, etc.) a new sub-class has been created: <tt>oracle.toplink.platform.database.oracle.PLSQLStoredProcedureCall</tt>:
 
To handle nonJDBC arguments (e.g. BOOLEAN, PLS_INTEGER, PL/SQL record, etc.) a new sub-class has been created: <tt>oracle.toplink.platform.database.oracle.PLSQLStoredProcedureCall</tt>:
  
For a target procedure:
+
For the target procedure:
 
  <font color="#000000">'''<font color="#575757">procedure</font>''' bool_test<font color="#555555">(</font>x '''<font color="#575757">IN</font>''' '''<font color="#575757">BOOLEAN</font>'''<font color="#555555">)</font>
 
  <font color="#000000">'''<font color="#575757">procedure</font>''' bool_test<font color="#555555">(</font>x '''<font color="#575757">IN</font>''' '''<font color="#575757">BOOLEAN</font>'''<font color="#555555">)</font>
 
  </font>
 
  </font>
x
 

Revision as of 12:31, 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 the target procedure:

procedure bool_test(x IN BOOLEAN)