code: @Override
  	public List<RecordAlert> getAlertsBySourceHistoryId(int historyId) throws DatabaseException {
      	SqlPreparedStatementWrapper psGetAlertsForHistoryId = null;
          try {
          	psGetAlertsForHistoryId = DbSQL.getSingleton().getPreparedStatement("alert.ps.getalertsforhistoryid");
  			List<RecordAlert> result = new ArrayList<>();
  			psGetAlertsForHistoryId.getPs().setLong(1, historyId);
  			try (ResultSet rs = psGetAlertsForHistoryId.getPs().executeQuery()) {
  			    RecordAlert ra = build(rs);
  			    while (ra != null) {
  			        result.add(ra);
  			        ra = build(rs);
  			    }
  			}
  			
  			return result;
  		} catch (SQLException e) {
  			throw new DatabaseException(e);
  		} finally {
  			DbSQL.getSingleton().releasePreparedStatement(psGetAlertsForHistoryId);
  		}
      }
docs: /* (non-Javadoc)
  @see org.parosproxy.paros.db.paros.TableAlert#getAlertsBySourceHistoryId(int)