private String state;
private ResultSet outRS;
public void setOutRS(ResultSet set) {
outRS = set;
setOutList();
}
}
private List getList(ResultSet rs)
{
List list = new ArrayList();
while (rs.next()) {
//iterate thru rs and map it to your POJO
}
release();
ex.printStackTrace();
release();
} finally {
release();
}
return list;
}
<parameter property="state" mode="IN" jdbcType="VARCHAR" javaType="java.lang.String"/>
<parameter property="outRS" jdbcType="ORACLECURSOR" javaType="java.sql.ResultSet" mode="OUT"/>
</parameterMap>
{call PROCEDURE(?,?)}
</procedure>
<settings
cacheModelsEnabled="true"
enhancementEnabled="false"
lazyLoadingEnabled="false"
maxRequests="32"
maxSessions="10"
maxTransactions="5"
useStatementNamespaces="false"
errorTracingEnabled="true"/>
</sqlMapConfig>
private ResultSet result;
if (arg1 != null) {
arg0.setObject(arg1);
}
this.release();
this.result = (ResultSet)arg0.getObject();
return this.result;
return null;
}
this.release();
super.finalize();
if(this.result != null) {
try{
this.result.close();
} catch(SQLException ex){}
}
}
From: Balayn, Anna [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 02, 2005 10:17 AM
To: '[email protected]'
Subject: Looking for sample code for processing result set returned as Ref Cursor (Oracle)
I am trying to use IBATIS with Oracle stored procedures. We have many procedures that return Ref Cursor as an OUT parameter. It seems that there is a way to process a Ref Cursor but I can't find any good examples or documentation on how this is done. Can anyone help?
Thanks
Anna B
This e-mail message and any attachments contain confidential
information from Medco. If you are not the intended recipient, you are
hereby notified that disclosure, printing, copying, distribution, or
the taking of any action in reliance on the contents of this electronic
information is strictly prohibited. If you have received this e-mail
message in error, please immediately notify the sender by reply message
and then delete the electronic message and any attachments.
