This discussion is archived
2 Replies Latest reply: Apr 5, 2012 12:31 AM by 927850 RSS

Corresponding Java type for Oracle's RECORD,TABLE AND RAW

927850 Newbie
Currently Being Moderated
I am using Oracle 11i and jdbc thin client through ojdbc6.jar .

I have a stored procedure which returns me an array of RECORDS and a TABLE.These are Oracle's AQ types

The datatypes are as follows :
TYPE MESSAGE_PROPERTIES_ARRAY_T IS VARRAY (2147483647) OF MESSAGE_PROPERTIES_T;

TYPE message_properties_t IS RECORD (
priority BINARY_INTEGER NOT NULL DEFAULT 1,
delay BINARY_INTEGER NOT NULL DEFAULT NO_DELAY,
expiration BINARY_INTEGER NOT NULL DEFAULT NEVER,
correlation VARCHAR2(128) DEFAULT NULL,
attempts BINARY_INTEGER,
recipient_list AQ$_RECIPIENT_LIST_T,
exception_queue VARCHAR2(61) DEFAULT NULL,
enqueue_time DATE,
state BINARY_INTEGER,
sender_id SYS.AQ$_AGENT DEFAULT NULL,
original_msgid RAW(16) DEFAULT NULL,
signature aq$_sig_prop DEFAULT NULL,
transaction_group VARCHAR2(30) DEFAULT NULL,
user_property SYS.ANYDATA DEFAULT NULL
delivery_mode PLS_INTEGER NOT NULL DEFAULT DBMS_AQ.PERSISTENT);

TYPE MSGID_ARRAY_T IS TABLE OF RAW(16) INDEX BY BINARY_INTEGER

MY stored procedure returns these datatypes.I want to call this stored procedure from a Java client through a callable statement.How should I register the out parameter for these? Moreover how do i access these in my Java program?

Thanks in advance.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points