protected void deleteRecord ( Connection connection , String hash ) throws SQLException { int id = selectRecordId ( hash ) ; if ( id > 0 ) { String [ ] queries = new String [ ] { Query . DELETE_FILEHASHES , Query . DELETE_METAS , Query . DELETE_CVES , Query . DELETE_RECORD_ID } ; for ( String query : queries ) { PreparedStatement ps = setObjects ( connection , query , id ) ; ps . execute ( ) ; ps . close ( ) ; } } }
Remove records matching a given hash . This will cascade to all references .