Package externaldata.gare

Examples of externaldata.gare.Gare


    }
  }
 
  public static Gare getGareFromUic(String uic) {
   
    Gare resultGare = null;
   
    try {
      ResultSet rs = null;
     
      synchronized (statementGetGareFromUic) {
        statementGetGareFromUic.setString(1, uic);
       
        rs = statementGetGareFromUic.executeQuery();
      }
     
      if(rs != null && rs.last()) {
        if(rs.getRow() == 1) {
          // Attention à l'ordre des champs dans la table
          resultGare = new Gare(rs.getInt("id_gare"), rs.getString("nom"), rs.getString("uic"), rs.getString("dua"));
        }
        else {
          System.err.println("DaoGare.getGareFromUic(" + uic + ") : plusieurs résultats.");
        }
      }
View Full Code Here


    return resultGare;
  }
 
  public static Gare getGareFromDua(String dua) {
   
    Gare resultGare = null;
   
    try {
      ResultSet rs = null;
     
      synchronized (statementGetGareFromDua) {
        statementGetGareFromDua.setString(1, dua);
       
        rs = statementGetGareFromDua.executeQuery();
      }
     
      if (rs != null && rs.last()) {
        if (rs.getRow() == 1) {
          // Attention à l'ordre des champs dans la table
          resultGare = new Gare(rs.getInt("id_gare"), rs.getString("nom"), rs.getString("uic"), rs.getString("dua"));
        }
        else {
          System.err.println("DaoGare.getGareFromDua(" + dua + ") : plusieurs résultats.");
        }
      }
View Full Code Here

      if (rs != null) {
        garesWithDua = new ArrayList<Gare>();
       
        while (rs.next()) {
          // Attention à l'ordre des champs dans la table
          garesWithDua.add(new Gare(rs.getInt("id_gare"), rs.getString("nom"), rs.getString("uic"), rs.getString("dua")));
        }
      }
     
    } catch (SQLException e) {
      e.printStackTrace();
View Full Code Here

TOP

Related Classes of externaldata.gare.Gare

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.