프로그래머의 삶 Programmer's Life/PersistanceSolution

커서가 out 파라미터인 Stored Procedure 호출 방법 ( iBatis )

Oliver's World 2011. 1. 6. 18:02
728x90


<!-- PROCEDURE sp_bokye_hakgwa_list (p_yyyy in char, p_term in char, v_cursor IN OUT t_cursor) -->

    <parameterMap class="java.util.HashMap" id="BokyeParamMap">
        <parameter property="p_yyyy"              javaType="java.lang.String"     jdbcType="char" mode="IN" />                                                                                                                              
        <parameter property="p_term"            javaType="java.lang.String"     jdbcType="char" mode="IN" />                                                         
        <parameter property="v_cursor"            javaType="java.sql.ResultSet"   jdbcType="ORACLECURSOR" mode="INOUT" />
    </parameterMap>
   
    <resultMap class="java.util.HashMap" id="CursorResult">
     <result property="1"            column="1"      />
  <result property="2"      column="2"/>
  <result property="3"             column="3"       />
  <result property="4"           column="4"     />
  <result property="5"            column="5"      />
  <result property="6"          column="6"    />
  <result property="7"          column="7"    />
  <result property="8"         column="8"   />
  <result property="9"          column="9"    />
    </resultMap>
   
    <procedure id="Hakjuk_bokyeList" parameterMap="BokyeParamMap" resultMap="CursorResult">
        {call PKG_aa.bb(?,?,?) }
    </procedure>

728x90