}
if (forward != null) {
return forward;
}
SubmissionSearchForm serachForm = (SubmissionSearchForm) form;
ActionMessages errors = serachForm.check();
if (errors.size() > 0) {
// TODO
context.setAttribute("runs", new ArrayList<Submission>());
return this.handleFailure(mapping, context, errors);
}
long lastId = Utility.parseLong(serachForm.getLastId());
long firstId = -1;
if (lastId < 0) {
lastId = Long.MAX_VALUE;
firstId = Utility.parseLong(serachForm.getFirstId());
}
int RUNS_PER_PAGE = 15;
SubmissionCriteria criteria = serachForm.toSubmissionCriteria();
if (isRejudge) {
int maxN = 100;
List<Submission> allRuns =
PersistenceManager.getInstance().getSubmissionPersistence().searchSubmissions(criteria, -1,