예제 #1
0
  public Esame BuildEntity(Object recordset) {
    ResultSet rs = (ResultSet) recordset;
    int key = 0;
    Esame entity = null;
    Note note;
    TipoEsame tipo;
    try {
      key = rs.getInt("ID");
      note = new Note(rs.getString("descrizione"), rs.getDate("data"));
      tipo = new TipoEsame(rs.getInt("esame_id"), rs.getString("esame_descr"));
      entity = new Esame(key, note, tipo);
    } catch (Exception exc) {
      System.out.println(exc.getMessage());
    }

    return entity;
  }
예제 #2
0
  public AnamnesiRemota BuildEntity(Object recordset) {
    ResultSet rs = (ResultSet) recordset;
    int key = 0;
    AnamnesiRemota entity = null;
    Note note;
    TipoAnamnesi tipo;
    try {
      key = rs.getInt("ID");
      note = new Note(rs.getString("descrizione"), rs.getDate("data"));
      tipo = new TipoAnamnesi(rs.getInt("anamnesi_id"), rs.getString("anamnesi_descr"));

      entity = new AnamnesiRemota(key, note, tipo);
    } catch (Exception exc) {
      System.out.println(exc.getMessage());
    }

    return entity;
  }