The
invokes the function of PG to generate the cursor, and then fetch all to return the cursor data set.
Jsondata lvret=new jsondata ();
Transjdbctemplate LVTJ = Contextholder.gettransjdbctemplate (); Lvtj.dotransactionbatch (New Transcallback () {@Override public void OnExecute (JdbcTemplate pvjt, NAMEDPARAMETERJDBCT
Emplate PVNAMEDJT) throws Exception {map<string,object> lvparams=new hashmap<string,object> ();
try{lvparams.put ("Date1", Util.deformatdatetime (Pvsdate, "dd/mmm/yyyy"));
Lvparams.put ("Date2", Util.deformatdatetime (Pvsdate, "dd/mmm/yyyy"));
Lvparams.put ("line", pvsline);
Lvparams.put ("Series_", pvsseries);
Lvparams.put ("station", pvsstation); Pvnamedjt.execute ("SELECT * from Fun_741_top10_by_date_line_series" (:d ate1,:d ate2,: line,:series_,:station, ' ref '); , Lvparams, New preparedstatementcallback<boolean> () {@Override public Boolean DOINPREPAREDST
Atement (PreparedStatement PS) throws SQLException, DataAccessException {ps.execute ();
return null;
}
}); lvret.result= pvnamedjt.queryforlist ("Fetch all in ref", (map<string,?>) null);
catch (Exception e) {lvret.errcode=1;
Lvret.errmsg=e.getmessage ();
Throw e;
}
}
}); return lvret;