ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Fagan <mfa...@tde.com>
Subject Proper way to map ref cursor in stored proc
Date Wed, 08 Jun 2005 16:12:44 GMT
Hi,

I saw that  IBATIS-53 was closed as fixed today so I am trying to 
upgrade my mappings to use version 2.1.0 of sql maps. Does anyone know 
what is the type to use for the ref cursor? I was using ORACLECURSOR as 
in the following mapping.

<!-- Stored Procedure call to Query Paged Records. -->
    <parameterMap id="queryParameters" class="map" >
        <parameter property="result" jdbcType="ORACLECURSOR" mode="OUT"/>
        <parameter property="user" jdbcType="NUMERIC" javaType="long" 
mode="IN" />
        <parameter property="resultid" jdbcType="NUMERIC" 
javaType="long" mode="IN" />
        <parameter property="startidx" jdbcType="NUMERIC" javaType="int" 
mode="IN" />
        <parameter property="endidx" jdbcType="NUMERIC" javaType="int" 
mode="IN" />
        <parameter property="fields" jdbcType="VARCHAR" 
javaType="java.lang.String" mode="IN" />
        <parameter property="filterfield" jdbcType="VARCHAR" 
javaType="java.lang.String" mode="IN" />
        <parameter property="filterstart" jdbcType="VARCHAR" 
javaType="java.lang.String" mode="IN" />
        <parameter property="filterend" jdbcType="VARCHAR" 
javaType="java.lang.String" mode="IN" />
        <parameter property="total" jdbcType="NUMERIC" javaType="long" 
mode="OUT" />
    </parameterMap>

    <procedure id="queryRecords" resultClass="java.util.HashMap" 
parameterMap="queryParameters" remapResults="true">
        { ? = call RECORDSET.getPagedRecordCursor(?, ?, ?, ?, ?, ?, ?, 
?, ?) }
    </procedure>

Thanks,
Mike Fagan


Mime
View raw message