Exemple #1
0
 public static int[] getChipChipIDs(ChipChipLocator loc, Connection c) throws SQLException {
   Statement s = c.createStatement();
   String name = loc.getNameVersion().name;
   String version = loc.getNameVersion().version;
   ResultSet rs =
       s.executeQuery(
           "select id from experiment where name='"
               + name
               + "' and "
               + "version = '"
               + version
               + "'");
   Vector<Integer> values = new Vector<Integer>();
   while (rs.next()) {
     values.add(rs.getInt(1));
   }
   s.close();
   int[] array = new int[values.size()];
   for (int i = 0; i < values.size(); i++) {
     array[i] = values.get(i);
   }
   Arrays.sort(array);
   return array;
 }