public void initProviders() throws DataBaseException { providers = dao.getProviders(); selectProviderCb.getItems().clear(); for (Provider provider : providers) { selectProviderCb.getItems().add(provider.getName()); } selectProviderCb.setValue(providers.get(0).getName()); }
public Provider getProvider(String name) { for (Provider provider : providers) { if (provider.getName().equals(name)) { System.out.println("> " + name); return provider; } } return null; }