title: Mapping multiple out params to a target object using IBatis for Java
body: <p>I am using IBatis for Java (ibatis2-2.3.4) I have a procedure which I am calling which takes 1 <code>IN</code> param and 4 <code>OUT</code> params. I have configured this in my <code>IBatis</code> mapping file as such:</p>
  
  <pre><code>&lt;procedure id="GENERATE_FILES" parameterMap="GENERATE_FILES_MAP"&gt;
      { call PAUL.GENERATE_FILES ( ?, ?, ?, ?, ? ) }
  &lt;/procedure&gt;
  </code></pre>
  
  <p>I would like to use the 4 OUT params to create my target object in my mapping file. Instead based on the configuration below the OUT objects just get set in the Map and I need to create the target object in my Java code.</p>
  
  <pre><code>&lt;parameterMap id="GENERATE_FILES_MAP" class="java.util.Map"&gt;
      &lt;parameter property="ID" jdbcType="NUMERIC" javaType="java.lang.Long" mode="IN" /&gt;
      &lt;parameter property="CODE" jdbcType="VARCHAR" javaType="java.lang.String" mode="OUT" /&gt;
      &lt;parameter property="NAME" jdbcType="VARCHAR" javaType="java.lang.String" mode="OUT" /&gt;
      &lt;parameter property="CREATE_DT" jdbcType="DATE" javaType="java.util.Date" mode="OUT"/&gt;
      &lt;parameter property="LINK_DT" jdbcType="DATE" javaType="java.util.Date" mode="OUT"/&gt;
  &lt;/parameterMap&gt;
  </code></pre>
  
  <p>So - anybody any ideas how I could use these 4 <code>OUT</code> params to create my target object within the mapping file?</p>
  
  <p>Thanks,
  Paul.</p>