Hi,
I need to implement a synchronization mechanism between a Mainframe backend and Oracle so that data is available for both platforms. The "issue" is that primary keys (and foreign keys) are hexadecimal (always 16 positions) on the mainframe and those must be used in the same (format) on Oracle.
This seems to be possible in plain SQL on Oracle, thanks to the to_number and to_char function.
For example:
Code:
select to_number('FFFFFFFFFFFFFFFF','XXXXXXXXXXXXXXXX') from dual; // 1,84467440737096E19
select to_char(1,84467440737096E19,'XXXXXXXXXXXXXXXX') from dual; // FFFFFFFFFFFFFFFF
Now my question is, how do I achieve this in Hibernate? Is there a possibility to convert those values automatically with mappings? The Java POJO will retain those values as a String and I would like those automatically converted from Java String to Oracle Number (in the above mentioned format) and vice versa when doing selects and inserts/updates in Oracle.
Thanks for the help.