I call the stored procedure from Java (Toplink) as follows:
PLSQLStoredProcedureCall call = new PLSQLStoredProcedureCall();
call.setProcedureName("PACK_PORTAL_VIEW.get_payment_details");
call.addNamedArgument("p_order_id", JDBCTypes.NUMERIC_TYPE);
call.addNamedOutputArgument("some_variable", JDBCTypes.NUMERIC_TYPE);
DataReadQuery drQuery = new DataReadQuery();
drQuery.setCall(call);
drQuery.addArgument("p_order_id");
Query query = ((JpaEntityManager) em.getDelegate()).createQuery(drQuery);
query.setParameter("p_order_id", orderId);
DatabaseRecord record = (DatabaseRecord) query.getSingleResult();
record.get("some_variable");
record.get("some_variable") returns some value that is stored in the DB with a fractional part, but in java it is written without it
record.get("some_variable").getClass() returns BigDecimal.class
How can I get the fractional value stored in the database?
It was necessary to use the following method: