-
Aug 9th, 2012, 04:14 AM
#1
pipelined and SimpleJdbcCall
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.
-
Aug 9th, 2012, 05:49 AM
#2
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 ;
}
-
Aug 9th, 2012, 05:50 AM
#3
function find_legal_org_name
( p_name_org in fdc_legal_person.name%type := null
)
return fdc_legal_person_v_rowtype_tbl pipelined;
-
Aug 9th, 2012, 08:38 AM
#4
this is my code)))where are error?
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules