Many databases support the REF CURSOR type. Java 8 has added direct support for REF CURSOR data type in the JDBC API by adding the JDBCType.REF_CURSOR enum constant that represents REF CUSROR data type in Java. Using this JDBC type, you will be able to work with the REF CURSOR type without using proprietary JDBC classes in your Java program. For example, you will be able to register the OUT parameter of the REF CURSOR database type in the printPersonDetails() method as follows:

cstmt.registerOutParameter(2, JDBCType.REF_CURSOR);

Image Tip  At the time of this writing, the JDBCType.REF_CURSOR type has not been implemented in the Oracle JDBC driver. ...

Get Beginning Java 8 APIs, Extensions and Libraries Swing, JavaFX, JavaScript, JDBC and Network Programming APIs now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.