ps.setLong(2, JudgeReply.ACCEPTED.getId());
ps.setString(3, QQ.QQ_FINISHED);
ResultSet rs = ps.executeQuery();
List<QQ> qqs = new ArrayList<QQ>();
while (rs.next()) {
QQ qq = new QQ();
qq.setCode(rs.getString("code"));
qq.setColor(rs.getString("color"));
qq.setNickName(rs.getString("nickname"));
qq.setHandle(rs.getString("handle"));
qq.setProblemId(rs.getLong("problem_id"));
qq.setUserProfileId(rs.getLong("user_profile_id"));
qq.setSubmissionId(rs.getLong("submission_id"));
qq.setSubmissionDate(Database.getDate(rs, "submission_date"));
qq.setStatus(rs.getString("status"));
if (qq.getStatus() == null) {
qq.setStatus(QQ.QQ_NEW);
}
qqs.add(qq);
}
return qqs;
} finally {