Extended Stored Procedure and Function Support

EclipseLink provides support for calling Oracle PLSQL stored functions that return complex PLSQL data-types such as RECORD types and TABLE types. PLSQL types are not supported by Oracle JDBC, so these types must be translated to Oracle OBJECT types and VARRAY types. OBJECT types are returned as java.sql.Struct and VARRAY as java.sql.Array types in JDBC.

Use either of the following to call a stored function using PLSQL types:

To call PLSQL stored functions or procedures, you must define mirror OBJECT/VARRAY types for the RECORD/TABLE types. Use the @Struct annotation to map OBJECT types to @Entity or @Embeddable classes. Normally, you can use @Embeddable, unless the OBJECT type defines an Id and can be stored in a table.