Hello!
Please tell me how to execute a stored function in Oracle database, which returns the table with pipelined, using SimpleJdbcCall.
examples are welcome!
Thanks much.
Printable View
Hello!
Please tell me how to execute a stored function in Oracle database, which returns the table with pipelined, using SimpleJdbcCall.
examples are welcome!
Thanks much.
public class ex_1
{
public String id;
public String name_or;
}
public void getList(){
AtomicReference<RowMapper> mapper;
mapper = new AtomicReference<RowMapper>(new RowMapper() {
public Object mapRow(ResultSet rs, int rowNum) throws SQLException {
ex_1 actor = new ex_1();
actor.id = (rs.getString("id"));
actor.name_or = (rs.getString("name_org"));
return actor;
}
});
funcGetActorName =
new SimpleJdbcCall(jdbcTemplate).withSchemaName(getSch ema()).withCatalogName("fdc_find_data_pck")
.withFunctionName("find_legal_org_name");
}
public ex_1 getActorName(String name_org) {
SqlParameterSource in = new MapSqlParameterSource()
.addValue("p_name_org", name_org);
ex_1 name=funcGetActorName.executeFunction(ex_1.class, in);
return name ;
}
function find_legal_org_name
( p_name_org in fdc_legal_person.name%type := null
)
return fdc_legal_person_v_rowtype_tbl pipelined;
this is my code)))where are error?