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 <tt>java.sql.Struct</tt> and VARRAY as <tt>java.sql.Array</tt> types in JDBC.

+

= Extended Stored Procedure and Function Support =

−

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

+

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 in JDBC as <tt>java.sql.Struct</tt> types and VARRAY types are returned as <tt>java.sql.Array</tt> type.

To call PLSQL stored functions or procedures, you must define mirror OBJECT/VARRAY types for the RECORD/TABLE types. Use the [http://www.eclipse.org/eclipselink/api/latest/org/eclipse/persistence/annotations/Struct.html @Struct] annotation to map OBJECT types to <tt>@Entity</tt> or <tt>@Embeddable</tt> classes. Normally, you can use <tt>@Embeddable</tt>, unless the OBJECT type defines an Id and can be stored in a table.

+

To call PLSQL stored functions or procedures, you must define mirror OBJECT and VARRAY types for the RECORD and TABLE types. Use the [http://www.eclipse.org/eclipselink/api/latest/org/eclipse/persistence/annotations/Struct.html @Struct] annotation to map OBJECT types to <tt>@Entity</tt> or <tt>@Embeddable</tt> classes. Normally, you can use <tt>@Embeddable</tt>, unless the OBJECT type defines an ID and can be stored in a table.

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 in JDBC as java.sql.Struct types and VARRAY types are returned as java.sql.Array type.

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 and VARRAY types for the RECORD and 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.