I'm implementing spring boot rest api application, in which I invoke stored procedure (which returns back refcursor). I need to show that response as JSON object with key, value pair without creating any DTO's or entity for that response. Is it possible to achieve the above requirement?
I get response(Cursor) from stored procedure.
@Override
public List getOrder(String orderNo) {
StoredProcedureQuery query = entityManager.createStoredProcedureQuery("xx.xxx.get_order_details"); query.registerStoredProcedureParameter(1, String.class, ParameterMode.IN); query.registerStoredProcedureParameter(2, void.class, ParameterMode.REF_CURSOR);
query.setParameter(1, "OR-1001");
List results = query.getResultList();.