Moved ensureNotDeleteByQuery method to QueryParserUtils