Пример #1
0
 public void insertIntoDB(PreparedStatement ps, int id) throws SQLException {
   if (dbid != -1) {
     throw new IllegalArgumentException("Already in DB!");
   }
   ps.setInt(1, id);
   ps.setInt(2, mapping.getDBID());
   ps.setString(3, name1);
   ps.setInt(4, genome1.getDBID());
   ps.setString(5, name2);
   ps.setInt(6, genome2.getDBID());
   ps.executeUpdate();
   dbid = id;
 }
Пример #2
0
 public int hashCode() {
   int code = 17;
   code += dbid;
   code *= 37;
   code += mapping.hashCode();
   code *= 37;
   code += name1.hashCode();
   code *= 37;
   code += name2.hashCode();
   code *= 37;
   code += genome1.getVersion().hashCode();
   code *= 37;
   code += genome2.getVersion().hashCode();
   code *= 37;
   return code;
 }