}
private void writeAlertToDB(Alert alert) throws HttpMalformedHeaderException, SQLException {
TableAlert tableAlert = getModel().getDb().getTableAlert();
HistoryReference ref = new HistoryReference(getModel().getSession(), HistoryReference.TYPE_SCANNER, alert.getMessage());
RecordAlert recordAlert = tableAlert.write(
recordScan.getScanId(), alert.getPluginId(), alert.getAlert(), alert.getRisk(), alert.getReliability(),
alert.getDescription(), alert.getUri(), alert.getParam(), alert.getOtherInfo(), alert.getSolution(), alert.getReference(),
ref.getHistoryId()
);
alert.setAlertId(recordAlert.getAlertId());
}