Oracle Types mapping Java Beans using MyBatis

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Oracle Types mapping Java Beans using MyBatis

Praveen Billampati
Hello there,

I come across a need to query a Oracle pl/sql function, the function takes Oracle Types as inputs and returns an Oracle Type as output. This needs mapping of Java beans to OracleType and Oracle Type to Java Bean. As I learnt one way of doing this mapping is using the traditional Oracle Struct and descriptor of Oracle Type, is there a support of these Oracle Types mapping in MyBatis. If so can someone please point to those docs or an example over internet or any guidance on this or any other ORM that can do these mappings.

Below are some sample types I will be dealing with.

CREATE OR REPLACE PACKAGE TestImpl AS

PROCEDURE findDesc(ref IN  "Ref_Type", desc OUT "Desc");
........
........
END TestImpl;

CREATE OR REPLACE TYPE BODY "Ref_Type" 
.....
constructor function "Ref_Type"
(
  shrt_nm varchar2
, long_nm varchar2
) return self as result is
begin
self. shrt_nm := shrt_nm;
self. long_nm := long_nm;
end;
END;

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.