Mybatis ResultHandler type for Oracle stored procedure is not working . its work for normal select query like (Select column name from table)
I have tried using @resultMap and below example . any help in this matter really helpful.
Select("{call sp_getPosition(
#{PLATFORM, mode=IN, jdbcType=CHAR},
#{c_arrPos, mode=OUT, jdbcType=CURSOR, javaType=java.sql.ResultSet,resultMap=arrPos})})
@Options(statementType = StatementType.CALLABLE)
public void getPosition(Map parameter);
/*DAO */
@Override
public void getPosition (String platform)
{
CustomResultHandler rsArrPosCalc = new CustomResultHandler();
Map paramMap = new HashMap();
paramMap.put("PLATFORM", platform);
paramMap.put("c_arrPos", rsArrPosCalc);
getDataMapper().getPosition(paramMap);
}
/*CustomResultHandler class*/
public class CustomResultHandler implements ResultHandler {
private ArrayList<Object> recordList;
public void handleResult(ResultContext resultContext)
{
recordList.add((Object) resultContext.getResultObject());
if(recordList.size() == MAX_COUNT)
{
recordList.clear();
}
}
--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
[hidden email].
For more options, visit
https://groups.google.com/d/optout.