}
private List<Result> splitResult(Result allInOneResult, int splitSize) {
List<Result> results = new LinkedList<Result>();
Result curr = null;
int idx = 0;
for (List<ResultCell> row : allInOneResult.getResult()) {
if ((idx ++) % splitSize == 0) {
curr = AutoBeanUtil.newResult(allInOneResult.getStatementKey());
curr.setStatus(allInOneResult.getStatus());
curr.setTimestamp(allInOneResult.getTimestamp());
curr.setResult(new ArrayList<List<ResultCell>>(splitSize));
results.add(curr);
}
curr.getResult().add(row);
}
return results;
}