public List<Company> getListCompanies() throws SQLException,
			InstantiationException, IllegalAccessException,
			ClassNotFoundException {

		ResultSet rs = null;
		Statement stmt = null;
		Connection cn = null;
		List<Company> CompanyList = new ArrayList<Company>();

		cn = ConnectionFactory.open();
		stmt = cn.createStatement();
		rs = stmt.executeQuery("select id, name from company");

		// création de la liste de companies
		try {
			while (rs.next()) {
				Company cie = new Company();
				cie.setId(rs.getInt(1));
				cie.setName(rs.getString(2));
				CompanyList.add(cie);
			}

		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			if (rs != null)

				rs.close();

			if (stmt != null)

				stmt.close();

			if (cn != null)
				cn.close();

		}
		return CompanyList;
	}