code: protected HashSet<Integer> getEmbeddedRecords(Set<String> hashes)
              throws SQLException {
          HashSet<Integer> results = new HashSet<Integer>();
          Connection connection = getConnection();
          PreparedStatement ps = setObjects(connection,
                  Query.FILEHASH_EMBEDDED_MATCH, (Object) hashes.toArray());
          try {
              ResultSet resultSet = ps.executeQuery();
              while (resultSet.next()) {
                  results.add(resultSet.getInt("record"));
              }
              resultSet.close();
          } finally {
              connection.close();
          }
          return results;
      }
docs: Fetch record id's from the local database that is composed entirely of
  hashes in the set of hashes provided.
  
  @param hashes
  @return A set record ids
  @throws SQLException