return selectMap(statement, parameter, mapKey, RowBounds.DEFAULT);
}
public Map selectMap(String statement, Object parameter, String mapKey, RowBounds rowBounds) {
final List list = selectList(statement, parameter, rowBounds);
final DefaultMapResultHandler mapResultHandler = new DefaultMapResultHandler(mapKey);
final DefaultResultContext context = new DefaultResultContext();
for (Object o : list) {
context.nextResultObject(o);
mapResultHandler.handleResult(context);
}
return mapResultHandler.getMappedResults();
}