public static Entreprise SelectEntrepriseById(int id) throws SQLException {
        String query = null;
        Entreprise entreprise = new Entreprise();
        ResultSet resultat;

        try {
            query = "SELECT * from ENTREPRISE  where ID_ENTREPRISE=? ";
            PreparedStatement pStatement = ConnectionBDD.getInstance().getPreparedStatement(query);
            pStatement.setInt(1, id);
            resultat = pStatement.executeQuery();

            while (resultat.next()) {
               
                entreprise = new Entreprise(resultat.getInt("ID_ENTREPRISE"),resultat.getInt("ID_VILLE"), resultat.getString("ENTNOM"), resultat.getString("ENTADRESSE1"), resultat.getString("ENTADRESSE2"));
            }

        } catch (SQLException ex) {
            Logger.getLogger(RequetesEntreprise.class.getName()).log(Level.SEVERE, null, ex);

        }
        return entreprise;
    }