stmtCon.executeQuery(sql);
rs = stmtCon.getResultSet();
int stateID;
Timestamp date;
ServiceStateInfoBean serviceStateInfoBean = new ServiceStateInfoBean();
try {
while (rs.next()) {
stateID = rs.getInt(StatusMonitorConstants.STATE_ID);
date = rs.getTimestamp(StatusMonitorConstants.TIMESTAMP);
serviceStateInfoBean.setDate(date.getTime());
serviceStateInfoBean.setService(serviceList.get(serviceID - 1));
serviceStateInfoBean.setServiceID(serviceID);
serviceStateInfoBean.setServiceState(statusList.get(stateID - 1));
}
} catch (SQLException e) {
String msg = "Getting the service state failed";
log.error(msg, e);
throw new SQLException(msg, e);