0
I am trying to return array of an object from an Oracle stored procedure call in Java.
I have created one OBJECT type at DB. This is having 5 attributes
Created a TABLE type of the object.( as I would return more than one object)
I have managed to get the output in the Object array.
My challenges is , I am unable to refer each individual object from the array of objects.
stmt.registerOutParameter(8, Types.ARRAY,"XXXXX.T_LAC_TAB");
stmt.execute();
ARRAY simpleArray = (ARRAY) stmt.getArray(8);
//Map map1 = con.getTypeMap();
//map1.put("XXXXX.T_LAC_TAB_O", ExpectedLacDataType.class);
//con.setTypeMap(map1);
System.out.println("Till here");
Object[] values = (Object[])simpleArray.getArray();//working fine
After I got the values array of objects, How I can move forward?
I have tried to create a custom java class and tried to setTypemap to the associated java class, but I am unable to get it working.
I cant paste the details of the code here , but , basically, I just need to know how ,
- I can fetch individual object from the returned array of objects and access each attributes of the retrieve objects