ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sudhakar Kanagarajan <s.kanagara...@gmail.com>
Subject Spring - Ibatis Stored Procedure Call
Date Fri, 02 Jan 2009 13:50:58 GMT

I have an Oracle stored procedure that inserts a row into a table from a set
of input parameters and returns a number back.

I want to map the input parameters to a Java object and return the output
parameter as Integer. 

I am not able to achieve this since the Ibatis Paramerter Map always expects
a Map or a custom java object and not both. 

Is it possible to achieve this? I have attached the Ibatis config below

<parameterMap  id="parameterTest"
class="com.fmrco.compliance.ace.builder.control.BuildControlObject" > 
    <parameter property="buildRunId" jdbcType="NUMBER"
javaType="java.lang.Long" mode="IN"/>
    <parameter property="ruleKeyId" jdbcType="NUMBER"
javaType="java.lang.Long" mode="IN"/>
    <parameter property="ruleVerNum" jdbcType="NUMBER"
javaType="java.lang.Long" mode="IN"/>
    <parameter property="dataLoadId" jdbcType="NUMBER"
javaType="java.lang.Long" mode="IN"/>
    <parameter property="buildTypeRefId" jdbcType="NUMBER"
javaType="java.lang.Long" mode="IN"/>
    <parameter property="buildStatusRefId" jdbcType="NUMBER"
javaType="java.lang.Long" mode="IN"/>
    <parameter property="buildComment" jdbcType="VARCHAR"
javaType="java.lang.String" mode="IN"/>
    <parameter property="addUsrId" jdbcType="VARCHAR"
javaType="java.lang.String" mode="IN"/>  
</parameterMap>

<parameterMap id="test" class="map" >
       <parameter property="inputs" typeName="parameterTest"  />
       <parameter property="numRows" jdbcType="VARCHAR"
javaType="java.lang.Long" mode="OUT"/>	 
</parameterMap>
 
<procedure id="BUILD_CONTROL_INSERT" parameterMap="test"
resultClass="java.lang.Long">
   {call BUILD_CONTROL_INSERT(?,?,?,?,?,?,?,?,?)}
</procedure>  



 

-- 
View this message in context: http://www.nabble.com/Spring---Ibatis-Stored-Procedure-Call-tp21251633p21251633.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


Mime
View raw message