I have a custom function in oracle returning a number after deleting records. I could get a value in sql_plus such as
call my_function(4) into :out_number; <
I used this to execute native functions in oracle:
Query query = em.createNativeQuery("select my_function(:param) from dual"); query.setParameter("param", 4); return query.getSingleResult();