I have this SP in my Dao class:
private class ScoreStoredProcedure extends StoredProcedure {
private static final String SPROC_NAME = "loadUserScore";
public ScoreStoredProcedure(DataSource datasource) {
super(datasource, SPROC_NAME);
declareParameter(new SqlReturnResultSet("score", mScoreMapper));
declareParameter(new SqlParameter("vusername", Types.VARCHAR));
declareParameter(new SqlParameter("vuuid", Types.VARCHAR));
declareParameter(new SqlParameter("vlimit", Types.INTEGER));
compile();
}
@SuppressWarnings("unchecked")
public List<Score> execute(String pUsername, String pUUID, int pLimit){
Map<String,Object> lAllScore = super.execute(pUsername, pUUID, pLimit);
return ((List<Score>) lAllScore.get("score"));
}
}
Everything runs fine but I have problems with the mapping of the result list. I have this line in the logs:
INFO: Added default SqlReturnResultSet parameter named #result-set-2
but why the ResultSet is mapped on the key #result-set-2
?
Here I declared it as declareParameter(new SqlReturnResultSet("score", mScoreMapper));
Whats the problem? The RowMapper is correct created...