Oracle SYS.XMLTYPE To Java oracle.xdb.XMLType ?

55 views
Skip to first unread message

Thomas Fuchs

unread,
Mar 30, 2017, 9:27:02 AM3/30/17
to jOOQ User Group
Hello Everyone!

We're migrating Oracle JPublisher Code having a deeply structured hierarchy of UDTs (PLSQL Types).
Some fields in the Oracle DB are sys.xmltype resulting by now in java.lang.Object in our generated JOOQ Code.

With JPublisher we had a "hint option" for code generation

-adddefaulttypemap=SYS.XMLTYPE:oracle.xdb.XMLType

Is something similar possible with JOOQ ?!?

thank you for reading
and answering

Thomas Fuchs

Lukas Eder

unread,
Mar 30, 2017, 9:41:22 AM3/30/17
to jooq...@googlegroups.com
Hello Thomas,

Thanks for your message.

jOOQ currently doesn't support the Oracle XMLType out of the box, yet. The pending feature request is here:

However, you can implement your own jOOQ to JDBC data type Binding as documented here:

For support of XMLType in UDTs, you will need to implement these two methods:

    void set(BindingSetSQLOutputContext<U> ctx) throws SQLException;
    void get(BindingGetSQLInputContext<U> ctx) throws SQLException;

... in order to bind your own, custom XML representation to JDBC's SQLOutput and SQLInput types. If you need top-level XMLType support, other Binding methods will need to be implemented as well.

I'll be very happy to guide you through this implementation if you have any specific questions.
Best Regards,
Lukas

--
You received this message because you are subscribed to the Google Groups "jOOQ User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages