コード例 #1
0
  public Collection<ExptCondition> getAllConditions() throws SQLException {
    LinkedList<Integer> conds = new LinkedList<Integer>();
    Statement s = cxn.createStatement();
    ResultSet rs = s.executeQuery("select distinct(e.condition) from experiment e");

    while (rs.next()) {
      conds.add(rs.getInt(1));
    }

    rs.close();
    s.close();

    return loader.loadAllExptConditions(conds);
  }
コード例 #2
0
 public void loadLastID(PreparedStatement ps) throws SQLException {
   ResultSet rs = ps.executeQuery();
   id = rs.getInt(1);
   rs.close();
 }