Announcement Announcement Module
Collapse
No announcement yet.
pipelined and SimpleJdbcCall Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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.

  • #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 ;
    }

    Comment


    • #3
      function find_legal_org_name
      ( p_name_org in fdc_legal_person.name%type := null
      )
      return fdc_legal_person_v_rowtype_tbl pipelined;

      Comment


      • #4
        this is my code)))where are error?

        Comment

        Working...
        X